Merge pull request #20 from stanislaw/faster_tree_build

10-12x faster tree build
Tree building algorithm without duplication

- And without branching.