Clean up code to satisfy RuboCop