wyatt's tree integrated & initial code audit

Code audit required due to tree version being implemented in ~2-3 version old code...
Tree works though :) lets get buttons integrated!