Initial public impelmentation

This is good enough to make public.