Main.c code shortened and Readme updated