Simplified code of slide animation

I can actually make it smooth movement at the end, but this variation looks good too.