Preparing tasks - working out block ranges