Code cleanup, switch to openGL renderer