Reorganising source code