refactor and unit tests
fixed typo
check for reduce views in find_report_types