Added TOC references generator

This patch provides TOC references generation (menu in the bottom left):
![screen shot 2014-06-13 at 21 47 24](https://cloud.githubusercontent.com/assets/693/3278126/650770fc-f3a7-11e3-94ec-b4d632629b38.png)