did the setvbuf thing which made a bunch more test cases pass, also fixed some formatting stuff