Unlike the partly self-governing boroughs that covered urban areas, the counties of medieval England existed primarily as a means of enforcing central government power, enabling monarchs to exercise control over local areas through their chosen representatives – originally sheriffs and later the lord-lieutenants – and their subordinate justices of the peace. Counties were used initially for the administration of justice, collection of taxes and organisation of the military, and later for local government and electing parliamentary representation. They continue to form the basis of modern local government areas in many parts of the country away from the main urban areas, although the newly created areas sometimes have considerably altered boundaries from the historic counties on which they are based.