minor style fixes, minor util encodings overhaul
Merge pull request #173 from rvagg/encodings-fixes

Custom encodings cleanup