Added 'restrict' to L&R calculation to possibly add some speed (profiling shows minimal effect.