First stab at issue #111

But I think I need to tear this up and come at it from a different angle.