Simplify macros and make corrections.