Clean up output formatting and some more tests