WIP: simplify api.