Added TreeCursor class