Initial implementation

The tests are failing :( Something is amiss. But this is the basic idea