Search struct, removed several globals