Tuned the code, added comments Fully Working