Modifications to collating code