Clean up repeated pattern with macro.