Refactoring for updateShortcuts