Refactor to only attempt container removal when there are containers