Completed the 3rd round of doc update.

Separated $.toc from $.md code.
Fixed minor issue with $.overlay.