Split javascript out into its own file
Add missing check for value in payment amount field