Variable resolver, refactoring