WIP: blocks support & editing + initial API.