Undo the mistakes made in the rush to get Amazon in Mustache. It's better to have amazon.js create a couple of divs with jQuery than it is to have atrocious is_amazon variables. Also go back to using x_required context variables rather than deeply nested method_metadata.validation.x.
This will make it easier to merge the Amazon branch on top of the form changes made for Worldpay.