Distributed encoding initial commit. Refactoring and commenting to be done.