More Flask.g wizardry to shorten things up