beautified client/main.c