Depending on ID for tasks.
Made IDs start from 1 (friendlier to user).
Calculating task positions separately.