>  There is only one place where you need to get the id from the node and it happens from one node only

I missed it's happening in a loop. Probably that loop (in the handleEvent method) could be rewritten to check for a class to find the correct node, and only then look into the map. But the general comment still applies.