Removed unnecessary codes & included some more comments