Remove globals from preprocessor

Hah, why are there globals here?