Merged database/frontend stuff. Settings is now in a working state.