Update unit-tests. Fix warnings.