Made code a little less cute in order to avoid division-by-zero with simple addition and subtraction
Added some more constants