Reformatted code to be PSR-* compliant
Refactored to use namespacing
Added unit test