Changed undo- and redo tool to properly support reject scenarios of a
connection.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>