Added some more comments for clarity, removed a parameter in a method call that wasn't being used