Refactoring .submit click handler

- One var for all variables
- Comments explaining what we are doing