Work in progress: Ed is working on this.