Recovery or working-up of waste materials