Added buildAck-Message handling and added comments.