Better handling for teacher and grade data from server