Generalizing to encapsulate

Keeping things in this branch so anyone wanting to contribute to Luke's
design can do so cleanly. This might be too opaque and in need of
changing later.