Fixed selections and added Undos