Eli Whitney (December 8, 1765 – January 8, 1825) was an American inventor best known as the inventor of the cotton gin. This was one of the key inventions of the Industrial Revolution and shaped the economy of the antebellum South. Whitney's invention made short staple cotton into a profitable crop, which strengthened the economic foundation of slavery. Despite the social and economic imact of his invention, Whitney lost his profits in legal battles over patent infringement, closed his business, and nearly filed bankruptcy. Afterward Whitney became a firearms manufacturer who supplied muskets to the United States government. He spent the remainder of his career promoting the idea of interchangeable parts for the manufacture of firearms. Although he was not the first to propose the concept of interchangeable parts and never developed a working system of interchangeable parts, he popularized the idea as a useful manufacturing concept. In order to justify the sale price of his contracted firearms to the government he developed improvements in cost accounting that included fixed costs that had gone overlooked in federal estimates for price comparison.