Reworked the way the tree structure is generated a bit. Using a stack
algorithm instead of a true "tree".

Tree now actually has a completed constructor. Whoo.

Fixed a mixup where I was calling model classes controller classes in
the packaging. I am a stupid.