Some cleanup of code.