Workign on cleaning up logging