MS420: Some tidying up of the code.