Merge pull request #964 from chrox/collapsible_toc

add license badge
Merge pull request #965 from chrox/collapsible_toc

fix #959
refactoring readertoc and readerfooter
so that they don't repeat themselves.