Various minor API fixes