Some minor improvements. Workaround return statement in clients main() to return correct value