Refactoring of association resolving.