gradient changes speedup
speed increase cleanup from ll
posterior sd speedup
sn fixes