Message exchange now fully working. Code needs some serius clean up