fix to duplicate series names(added closure), misc cleanup