Resolve rubocop warnings and add a .rubocop.yml file