Refactor some opcodes