refactor map initialization routine.