Issue 171

The basic framework
See also #177