fixed some comments, removed unnecessary variables