Properly update selected machines thoughout the app and add tagsClicked function