* Moved argument parsing to separate function

* Fixed program termination triggered by closing GLFW window