Clean up decomposition code