Intermediate checkin of some changes to support removal and re-adding of particles (in order to restore original stacking structure).