Further work on Api:

* connects to core
* leaves core with close