Better parsing of package names