Refactors views