Refactor server implementation to be more modular
Add basic API wrapper for CRUD operations on the DB