rename form fields (see issue #31)
reformat some code