Refactored to use CustomPrinter as thing
C version is not compiling