Setup

I'm submitting this as a PRQ now as it (shouldn't) make breaking changes to production, however does mean that development can be done without access to the production environment.

Even more than usual, I recommend testing these changes in one of the test directories first before putting it live to the general populace (or potentially even waiting off until after the end of term)
That should probably be $term, not $terms