Adding comment header and program comments. Some code cleaning

time.sleep(0.1)