A few areas of code cleanup