Fixed a load of JS stuff that validation picked up.