Refactoring

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

* TOKWITHME_DEBUG env var
* Api tests
* Separated Api and Client
* Synced client submodule