PSR-2, Docblocks and small features

These changes make the project compatible with PSR-2, adds the documentation blocks and some small fixes and features.