MAny changes, mainly getting unittests for all classes to work both in Ecliplse and at command line.