Formgen improvments