Combined functions
Fixed bug where slides would cycle too fast)
Minor change to code layout