Refactored to only handle what's needed to slide