rubocop fixes, small code improvements