level two headers on table of content

ok, well, this code became bigger than I imagined... and a bit confusing. let me know if you have any thoughts to improve it.

I'll provide a better documentation for this, dont need to merge yet.