Deprecate support for PHP 5.3
Move to PSR4

Also, more test coverage, and some bugfixes in the error handling