Generalize cache handling
-- whitespace
Generalize wrap logic
Mark initialization state
Fix leftover refactor issues