Added a travel function and fixed some bugs.