added some more static variables for global access, and method to terminate app on in-sufficient input