Reconstructing code. Added command line arguments parser
First working client after refactoring