move function macros and globals into their own space