Some cleanup code fixes.