Loop to remove inactive containers. There are still some glitches