added some comments, removed unused logger