Placed test code in messenger.py into main function