Fixed a bug where not all of the targets were getting processed.

Multiple targets emanating from the same egress point were not getting processed. I modified the code to iterate over the hook session IDs instead of IPs and did a little code cleanup.