Added a select tag to put all the semesters in external teachers list and refactored some code