Some cleanup and comments