Refactor how map option is applied.