Just a nit, perhaps a better name for this method would be normalize_attributes.