minor cleanups in form handlers