Change some cycles to for_each/accumulate
Displace split cycle with accumulate
Minor changes