Remove some redundant code from the slide routines.

These should be refactored into a single one size fits all routine.
Remove single use local functions in the various slide routines and inline them instead.