Implement new high-level API.