More Implementation of Tree + Bugfixes