adds missing appendices, headlines and toc