Moving spublish and sretrieve into one tool sdat