Fixed checkOverdue, minor formatting changes.