Added messaging queue and fixed some bugs...