This book which appeared a year before The Condition of the Working Class in England and the greater part of which was written by Marx contains the foundations of revolutionary materialist socialism the main ideas of which we have expounded above The holy family is a facetious nickname for the Bauer brothers the philosophers and their followers

What is the correctly punctuated version of this sentence?
This book, which appeared a year before The Condition of the Working Class in England, and the greater part of which was written by Marx, contains the foundations of revolutionary materialist socialism, the main ideas of which we have expounded above. "The holy family" is a facetious nickname for the Bauer brothers, the philosophers, and their followers.