Refactor: change mapdict to puzzledict