Factored global variables out of main application