Remove commented lines, correct logging, and make tests green