Namespaces and formatting cleanup