Add flash_class helper. Refactor flash notice view code