Cleanup namespaces and handle #46