added flash notification mechanism (client side)
refactoring