Refactoring code into storage module
Refactoring parsing functions