ESDEV-983 Remove support for legacy module
Fix encoding.
Add missing fields (from 2ccc863).