Remove duplicated variable callback code