Split large functions into discrete parts