doc && refact code to markdown_toc repo