form and errors cleanup