Lint fixes.
Update some dependencies.
Split testing infrastructure into private and public parts.
Delete some unused code.