Refactor form.