Fixed potential zero division with a divisor check. Added an additional assert (see the comment above the assert). Fixed late submission penalty calculation.