Improvements to make macro expansion work well.