Modernized the grid parameter selection, added parallelism