More work on ideas for new API.
Merge branch 'master' into github