Test fixes

Fixes some of the linting and the tests.