Added Sleep() so a reasonable framerate can be achieved