Dividing programs into smaller pieces