Output

Sorry I accidentally merged the previous pull requests. These are the commits that I've implemented for the output.