Added error checking & gradebook

Added error checking for the tables, which eliminated a lot of potential
errors. As well as setting up most of the gradebook panel and its
functionality.