move macros from sources to headers