Adjust to become a standalone library.

* Cleaned up documentation
* Changed namespaces, cleaned up quite some code.
* Adjusted the tests to be more friendly to run on a dev machine and to work with php 5.3 too.