Logger code cleanup