Added some utility functions for construction and running of the tornado application outside of the management command