Merging Jas's scripts.