Q5: do_define_form() support for variable definitions

Also took a closer look at Pair, which due to the __len__ and
__getitem__ implementations can trivially be converted to a list via the
builtin list() function.