Refactor make_flash_div helper method