refactor

* Add /api/ to path endpoints. API still in development so no major bump

* Move database connection to separate method (encapsulation)

* Change structure to separate api and client (resolves #9)