Remove legacy code from form.js