Refactores the Controllers and Views