Removes unnecessary namespaces