Made minor changes to satisfy rubocop