Mainly move printer out of static context into an argument. Less globals the better.