Some cleanup in the code.