Refactored msg listening into own function to cleanup async calls