Some cleanup on the code.