Create and destroy containers based on the type