Fix serious mistake in extract-media-query
Clean up media query rendering phase