Cleaned up JavaScript as per JSLint
Added data attributes and JavaScript to change button text on submit