reworked traceCommunications and logging; added some doc comments