Refactor preprocessor