There's a lot of trailing spaces in the output, and these should be cleaned up with some way.
I might look at this in a while