Added client side model for teacher.
Fixed minor bugs.