Updated script to extract morphological data