Sketching the implementation.

Started playing with a sketch for the implementation and the general
API.