I used the LISTBASE_FOREACH, LISTBASE_FOREACH_BACKWARDS, and LISTBASE_FOREACH_MUTABLE
macros instead of almost all of the remaining for loops in the interface directory.
I only skipped a few loops in the monstrously nightmarish ui_handle_menu_event function.
Also, I only changed variable names where I had to to prevent redeclarations.