Remove commented code and refactor ifs

There were a couple of commented lines of code that were removed.

Also changed inverted ifs to unless, since there was no else branch.