Form required fields, added form_type field and small fixes