Removing unused variables, adding {} to single-line if and for in helper methods