Add profiling flags
Optimize quad tree