Added method fill_form()

Also minor pep8/pyflakes fixes