minor refactoring of view resolving code.