Lots of refactoring to make the app more modular - user model in place