transform some views from function- to class-based

fixes some pep8 issues. use lowercase function name for the stuff we keep as function.