Added inital PHPUnit tests. Added some convenience methods. Fixed TravisCI config.