Code restructure. Starting storage functionality