remove logging, tidy comments