Update zinterface API

Changed the zinterface API to be only stateful, no longer a mix of
stateful and stateless, as per the discussion of #592.