Overwork the cookbook and introduce autodetection