Add name extraction to parseMediaQuery method