Replace vector with map
Added synchronization to config manager