Added empty-on-failure to get-best-root and other misc changes.