Refactor flash div