Updated for safer multithreading

Enumerations are no longer concurrently modified, and were replaced with iterators which use the same interface
Vectors replaced with ArrayList for same reason.

This isn't a huge problem, but may fix instability issues which don't throw an exception.