Refactoring vigridr.