Imported stuff from DSQ.