Added header, improved comments and added n to the output.