Fixed exercise 7 and rubocop offenses