refactored code in most controllers.
refactored a few things within the models.