Add variable API

Often an option should simply set a variable. Cater to this common case
with a variable API built on top of the block API.