More work on API, and a connection (but not implementation) in the main source