Fixed several bugs: for loop index in parts b/c; replaced use of shared variable feature_idx with thread-local variable f_idx; removed min(.., C); fixed vector value assignment for reading in data and creating pi vector; switched critical block to atomic; and only update w if delta is unchanged