fixed minor unit test issues
various minor changes and adjustments