Cleaning up warnings and improving coverage

Slightly anyway.