Added simple tree visualisation lib for debugging trees.
Added JSON generator for fragment retrieval.