Can you maybe move common functions out into a module used by both `/list` and `/map`? Ideally this should be refactored into a common module that can be extended, but that would do for now