moves some standard display cleanup code into models (controllers are too hard to read right now!)