Fixed bug in do_define_form, wrote preliminary merge