Fixed some minor bugs

Minor bugs fixed.  Main program should reference the modelData
dictionary.