This prelude is actually almost identical to J.S.Bach’s original version of the C Major prelude from the Well-Tempered Clavier (BWV 846a):
The original manuscript is quite telling in how Bach may have written it:
Finally we can compare this version with the famous version we know and consider what changes Bach made later and hypothesize on the reasons for these improvements.
In his article “Prelude on a Partimento: Invention in the Compositional Pedagogy of the German States in the Time of J. S. Bach” Vasily Byros offers a fantastic graphic analysis of the final prelude using the terminology of the period, offering a great overview of the piece and its structure.