[WIP] Decomposition refactoring

Fix issue #2238