Refactored and properly implemented reading from map. Now we need to actually use this implementation