Manipulation of cold molecular ensembles