cleanups; undefine macros after their use, set some UNUSED attributes