Imported TextbookTracker code.