Added tree structure, and getOptions.