Refactor js to separate out steps and save as single object in localstorage