refactoring and updating models/controlllers/views