Better handling of the sofness parameter and some more divide by zero issues