Major file resorting, limiting cross references and modularize