Fixed most test suite failures
Fix build and unit tests