Banish use of has_vars
Refactor storage functions