source: finally fixed memory corruption issues. Also corrected mistake made with testing the visdata against the leaf faces. Framerate is low - going to implement frustum culling and see where that gets next.