Complex sentence: The castle gradually fell into decay over the centuries, however, it became the headquarters of the North Yorkshire Militia in 1855 with military barracks constructed in the great court yard.
Split into simpler sentences: The castle gradually fell into decay over the centuries. However, it became the headquarters of the North Yorkshire Militia in 1855, with a military barracks constructed in the great court yard.