More code cleaning and documentation updates.