merges from nshiny, mostly