progress -- compiling but not surviving unit tests
fix issues and add several new unit tests