Refactor opcode handlers to be more concise by grouping similiar opcodes together