Added a replace function to the interface INode as well.