Wraps app.locals and provides helper methods for setting up flags that can be used in view generation.