Added basic tree implementation