Changed storing for division, added writing null if dividing by zero