Added some more code style consistency (still horrible).
Slightly changed how exceptions are handled.
Added list of currently used error codes.
This is version 0.3.6.