small cleanup and DRYing in preprocessor