A copy of jc-tree from https://code.google.com/p/jc-tree/