simplify __main__.py and get as much coverage as possible
Make printer_test, stats_test not depend on typ

and make sure their coverage is 100%.
fix output formatting for run_under_coverage