Refactor code

Rename 'speedx' to 'vx' and rename 'speedy' to 'vy'.