Use Bundle to store state for undo

Instead of member variables
Fix wrong state shown in undo bar after skipping