Added console output

Probably the ugliest code you've ever seen.