Cleans up form handling.