Divide encoding implementation
Merge branch 'setup'