Remove dependency on other classes from XBGLEngine. Keep it clean.