Add some utility functions and macros.