Refactor views in separate classes, code cleanup