Removed some unnecessary encoding/decoding and normalized newlines.

Fixes misfo/Shell-Turtlestein#60.