#3 Extracted program name to a higher level
#3 Bit of house cleaning and error case handling testing