Updated for mostly-working decomposition