Add printing functionality to state machine.
Simplify print specialization and add defaults for string and char