Some small changes to get rid of bad code.