Changed the formset code a bit