Skeleton for learning

It remains to work out some details of design and implement everything.