Split up javascript into multiple files; use localstorage to save data upon clicking submit