Added more opengl error checks.
Moved scripting initalise to each file.
Some improvements to OpenGL3.2