first pass

I think it all works, except the proxy parts which we don't yet need