Rewrite macros to reduce boilerplate. Use a timer for the source of the LED brightness.