refactoring stuff so model stuff is in the model and view stuff is in the view