Fixes in performance, lights and rendering. Also working on terrain.
Reformatted code.