Restructuring code to increase efficiency.