Refactored to use function pointer table for all major opcodes