add rubocop and fix a bunch of rubocop issues