Refactored add student form to edit student form

Refactored the add student form so that it can also be used for editing
students.