Added moveTo function to the Entity class