small code cleanups to make rubocop happier