Fixed bad syntax.
Extracted function for fully expanding a form
Fixed typo.