Put flash messages in a partial,  remove unecessary code from segmentio snippet