Refactoring of preprocessor