Put macros in front of functions, fix #49