Some refactorings within the project reference checking.