Program now runs from the command line nicely.