Pep8 and some minor fix of io_utils
Full rewrite of sim_pipeline_test
Fixing more tests.
Merge with test_fix