Adds debouncing to the window resize listeners. Moves some of the more significant module logic to the tops of the modules.