Use of command line options, read data fron serial port and minor changes