Destroying containers

PR opened again due to me being in retard mode. This PR adds #1014.