repository cleanup and chapter numbering