Trying to replace self-modifying threaded code with separate look-up table.