Finalizes map generation and adds toString().