Refactor into storage module
Refactor into timer module