Just outside the main walls, the castle mills had become increasingly ineffective from the 16th century onwards because of a reduction in the flow of the rivers driving the water-wheels [REF].
The suitability of the prison was finally brought to a head at the 1821 assizes in York, when an official complaint was made and an investigation begun [REF].