Adding tests and correcting PendingMessage
Updating documentation