moved opcode functions into separate file