Completed implementation of StudForm, data is passed to main routine so it can be sorted.