Cleanup output and minor fixes.