refactor flash divs in application layout