Pruning still not working. Changed inf and -inf to inverse values to check behaviour