Simplify EncodedString conversions; fix ArgumentError raised from #split

Also, make Rubocop happy