Refactor code
Add a cache to the quadtree
Fix bug on weight computation