Added leave command and associated plumbing.