Cleaning up the new genmesh routine for avoiding large rea files.