Cleared up the configuration generator code, removed the anonymous function and replaced it with a for loop.