Performance improvements

1. First uses String.slice/2 with ranges which is considerably faster in Elixir master

2. Second one relies less on Enum.join/2 and uses IO.iodata_to_binary. This means we don't need to reverse lists nor build binaries via join. The downside is that lists end up with an extra line but that doesn't violate the spec