Fix pivot, add test coverage
Fix pivot, add test coverage
Save images in unit tests
Update unit tests