implemented Messages Service and fixed some Bugs