Added ship following capabilities

There are still some minor rough edge cases, but all in all the functionality is working neatly. This time the patch is sent with only one commit on top so that the history is cleaner.