Merge branch 'master' into kyle
Merge branch 'master' into kyle
Placed control-panel specific actions into function.

Global-scope function calls were happening on EVERY page refresh.
Caused templates at swu to get spammed.
Merge branch 'kyle'