added a model, a new partial, and refactored some code