Removed unnecessary db.commit() from getClasses()