Registration function cleanup