make sure that the refrences to the passed job q and params are removed and a little cleanup