fix some comments and remove a couple of useless variables