Fixed major oversights, calculation makes more sense.