A lot more work on client handling