Complex sentence: Eighteenth-century prisons were effectively lodging houses, poorly maintained and often filthy, and might consist of a couple of rooms in a cellar.
Split into simpler sentences: Eighteenth-century prisons were effectively lodging houses. Poorly maintained and often filthy, they might consist of a couple of rooms in a cellar.