Minor refactoring to fix chgrp error
Refactor preprocessing step to class
Preprocessor edge cases and unit test