Moved the formset to the endscripts