Remove empty xpath keys. Remove count keys and indices from xpath keys.