Bz1004686

and some other minor improvements