plot mode profiles
fix pep8 warning
update testing
fix pyflake warnings
move tests to source file

Thus, we do not need to import files explicitly