Added new tree class, should hopefully make things a bit cleaner.
Compiles, that's a first step!