Rewrite autoConfigSearch to be more succinct

Also remove the use of multiple arrays that need to be the same length,
instead replace it with a class that encapsulates all the info.