Fixed some missing var declarations in js.
Fixed enter key submitting form.
Fixed: Correct keydown event detection for fields