Separated initialization from OpenGL calls.

Also added MouseListener.