Fixed crash when creatures have null movement speed; refactored a few other functions