Refactored code. Added support for composer. PSR-2 code compatibility. PHPUnit tests.