Factoring Parser module with encodeScriptOps and decodeScriptOps