This is the first Implementation of a quad tree I have made so there is some room for improvement.
A QuadTree uses the Hilbert curve and can be explained here