Moving more logic into the models, more view cleanup