cross-references and code cleanup