Base Tree data structure functionality - needs further organization, but provides the core functionality at the moment