Properly fix tests to compile, and other small bugs