Refactored flash messages view