Added Tree testing. Fixed the found issues and tests complete successfully now.