cleaning up the variables and minifying the code for the ship movement