Fixed rounding errors and added Update handler