Brought flash  gem into code
Reason: due to filters not being run in the correct order