Refactor parts of InputCtrl into an angular service (StudentService)