cleaned up output while building dictionaries.