Parallel prefix sum added + minor amendements.