- added flash messages and refactor using Rubycop