Large overhaul: bugs, readme, comments, etc.

Refactored to support PSR-4 compliance, reworked Readme, changed naming
convention, added comments to the whole class