Unit tests after complex primary keep support refactor all working now