Refactor into module, add stubs for routes, copy database models from other attempt