Fixes, and make unit tests pass. Note: phpunit is php only. hhvm cannot run phpunit