Add encoding
Refactor, skel code, etc