Add duplex unit, which allows for different behaviour when ticking into and
out of it.
Add examples.