Make some of the changes Simon recommended

Move to volatiles immutable maps instead of concurrenthashmaps, use a better way to iterate