Code refactoring needed for the new encoder. Moved all store/calc
functions to ea_store.c and all restore/fixup functions to ea_restore.c