Breaking down fns
Saving on exit
Using hashes approach