Add plain balanced tree structure. Patch #5827.