Updated app to use the g app context and added tests