rubocop and code cleanup