Create FlashMessages.php and fixes