Refactored spheretree.h into multiple files