Refactor flash message partial