Slowly improving test coverage and cleaned up some warnings.