cleaned the code and added some comments as well as got rid of all the hard coded stuff.