Further changes to slide method

Initialised variables due to the test function throwing warnings