Rubocop fixes

This change fixes some bits identified as incorrect by rubocop.