Some class enhancements and adding PHPUnit tests.

- Still a lot more to do.
Adding .travis.yml file to repo