Removing duplicate macros and unused imports.