WIP: simplifying code with preprocessors