Added tool id + handling undo redo differently