Remove extra files and tidy namespaces