Waste transformation and recovery