Removed unusued variable and added comments