Refactor view variable in custom code.