clean up title in external references
sort external references by occurences