Slight changes to code.