Made several changes based on RefactorCop suggestions.