no better, more prompt or efficacious remedy could be found than a house of confinement where it could be contained, where such people could be forced to live in a discipline proportionate to their sex, their age or their fault.