Added client handling

refs #3