Added distribution extraction to scripts