little progress on caching refactoring and more todos