refs #3811 alerts messages cleanup and minor refactoring