Custom folding classes moved to platform, other refactoring

No match.