More reworking of the new API. Too many fixes to mention, but it is starting to feel fairly stable now.