Adding fast tree implementation