Improvements on form generation