Removed unneeded variables and commented a little