Added and refactored flash messages