Parallel scan algorithm

Minor clean-up