added parameters to set_root_default
more tidying up