Changed movement code, fixes issue #1.