Api

Adds a basic api. Needs a bit of tweaking to get the root node right in all cases, and you can't refresh_facts yet, but CRUD works (use PUT/update for provisioning a node).

Side note, also handles the renamed methods in core.