Improved quickMessages code