Refactored compiler and api macros.