Added Search array as cglobal constant to replace switch statements for search factories