Refactored the toc.js file into three models and fixed typos in the test harness