Use hash to store TOC item instead of Array

Use hash to store TOC item instead of Array.