fix fetching config options
refactor tree structure