Created tests for quadtree and fixed bug. Improved quadtree. Made visual generator use quadtree for optimisation.