Added Subtree support and identify node rearrangments

perf and functionality tests: http://jsbin.com/uhoVibU/4