Moved all slide functionality to a namespace/object called Slides. Made some helper functions private in this namespace.