Remove some unesessary variables, and add a couple of comments