Implement remaining opcodes; tests