A lot of fixes to opcodes and some tests.