Update namespace and cleanup code