The meat of the script is the same as before - now it just prints more cleanly.