Add debug to master branch
Add support for submit buttons
Add support for overriding form submit parameters
Tidy/refactor script for production