Simplify SelectSlides and fix a couple of problems there