Refactoring of map initialization