fix a bug in remove_samples for when more samples are selected than have gates
add auto-save; minor ui tweaks