Splitting large functions into smaller ones