- error handling: defaults to 0 instead of -1; -1 set on all errors
- repetitive code: replaced with macros
these improvements are nly slight and better onnes suggested from long perspective
these improvements are nly slight and better onnes suggested from long perspective