Clean up code using X-macros.