Remove obsolete attrs.
Use default dict rather than setdefault