Changed display routine to not directly reference cout, so that it could be more generally useful.