Fix up preprocessor

Remove globals.