refactors to move more functionality to the repo instead of relying on cache.