Cleanup license-printing code and make output format better