The origins of the workhouse can be traced to the Statute of Cambridge 1388, which attempted to address the labour shortages following the Black Death in England by restricting the movement of labourers, and ultimately led to the state becoming responsible for the support of the poor. However, mass unemployment following the end of the Napoleonic Wars in 1815, the introduction of new technology to replace agricultural workers in particular, and a series of bad harvests, meant that by the early 1830s the established system of poor relief was proving to be unsustainable. The New Poor Law of 1834 attempted to reverse the economic trend by discouraging the provision of relief to anyone who refused to enter a workhouse. Some Poor Law authorities hoped to run workhouses at a profit by utilising the free labour of their inmates. Most were employed on tasks such as breaking stones, crushing bones to produce fertiliser, or picking oakum using a large metal nail known as a spike.