A lot of refactoring to remove the dependence on cache files for running actual procedures