Fixes and improvements on form generator.