Improved, partly via Rubocop.