Should this be `appIdToUI.remove(a.id...`. Otherwise that HashMap will grow forever right?