Refactored Caterpillar constructor