Change map logic to use Groovy withDefault