Some updates to support use by other libraries