Add nested-maps as a dependency
Refactor palette function