Added documentation for replaceLabels and getUndoableFunction

...