Reorganized function around
Created reactive variable for the selected plant through the typeahead