fixed itemgroup-document reference bug, refactoring and add project reference checking for unused as well