Refactor some views