build, pass tests

With these changes, all tests pass again.