Added flash messages, did not refactor