Changed rendering code, preparing to switch to shaders