Refactoring of identifier resolution