Still debugging - added better asserts in unit tests