Mostly refactor logic to new cachable API