Split mode macros into interface and implementation.