Code cleanup and bug fixes for updating the return value of PostMessagesAsync
Improved testing of PostMessagesAsync and PostMessages