Refactoring + fixed shouldPreprocess