Fully working messaging function

Left to do connections