Fixed output layout, possibly finished.First test.