Made the library code PSR-0 compatible and added composer, as well as a phpunit.xml.dist
Fixed tests