Foldable unit tests & fixes.