update modal views
Update diff view and move some XML function