Minor refactor to flash_helper