Disable submit button when displaying error

Also some cleanup

Closes #13