Moved API generating macros; step 1
Moved API generating macros; step 2