Hoping and praying to the code gods that this fixes the divide-by-zero, thanks to Hawk Kate for catching this
Fixed some random stuff