Refactor based on RefactorCop's suggestions