Some small changes to code.