Bug 899847 - Rework public api to conform to v2 of the spec.