Optimized the game term searching routine