Rewrote Messenger class to fix #5