Refactoring

* Simplified Database
* Separated Api and ApiHandler
* Removed code duplication from tests
* Switched client submodule to dev