Got sliding movement sort of working. There is a rounding error somewhere though