wip on removing use of globals
removed use of globals, except in ScalatraBootstrap