Add format test.
Fix newline bug.
Add print test.
Increase test coverage.