more refactoring
improve messenger error handling