Move more code outside of macros.