Add some new macros and functions