More initial work, added registration from the client