fixes #7660: fixes first bunch of rubocop warnings