Added a way to put it into a file.
More small changes to formatting.