Refactored some code, less calls to ConcurrentHashMap