Finalize basic version of sub-api layer

This commit finalizes the (very) basic functionality that our API
will be build on top of.

Next: API layer and some "real" subscribers