Backend

Refactoring to separate concerns in the app.