Refactored to build roots.