After implementing all except the actual message sending parts