commented a lot of the code and moved the opengl initialisation into its own method