More refactoring... with the main document intact