app messages refactor