Added missing punctuation back in.
Fixed up some odds and ends.
Modified main to take input from the command line.