Break module tests into different files; Repair flake8 warnings