Replace work dictoinary and update Tree