refactored view rendering, views, view events, and templates on teacher page