Quad tree improvements and more tests