Fix bugs found by the oracle, add undocumented opcodes.