Hopefully a better algorithm to calculate the sum of forces. Also changes long doubles to double.