Add flash messages
Remove outdated function