Added resize function to cave factory.