Improve linker by moving least dependant types on the top.
Fix PInvoke to work with a simple SDL application. OpenGL doesn't work still.