Cleanup, printing refactoring