Fixed bug in placement of commotionc instantiation, and finished centralization of the logging functions