metadata hierarchy - js: better class id parsing