more work on interfaces: datastructures, api, build, compile