refactors some views