Some re-arrangement, related to locals and logging