Added AppMessage code