Added getFormData function and formatting fixes