Modify className extraction to support multiple classnames