The earliest European exploration of Connecticut was conducted by the Dutch. The British Crown granted land to some English aristocrats in 1631. The Dutch and English disputed over the territory. In 1636, an influx of immigrants arrived from Massachusetts, looking for a change of government. They resolved the Indian question in 1637 by killing most of them. Charles II granted the colony a royal charter in 1662, which remained in effect until the present constitution was adopted in 1818. The colony declared itself a free and independent state in October 1776. The state was the scene of several battles during the Revolution. Danbury, New London, and New Haven were all attacked by the British. Following the war, Connecticut claimed territory far to the west, based on its original land grant, but was eventually forced to relinquish its claims. Eli Whitney developed the first rifle with interchangeable parts, and Connecticut became a pioneer in assembly-line production. The War of 1812 was not popular in Connecticut, whose trade suffered as a result. The state was a bastion of Yankee support during the American Civil War. Hartford became the nation's greatest center of insurance.