Simplify encoding logic
Merge pull request #263 from rip-lang/gh-pages

Simplify encoding logic