Adding comments, refactoring a couple of methods