Fixing up the last of the broken opcodes. Still probably needs tweaking.