Handling swapping pets.
Fixing a small bug.
Fixing some naming conflicts.
More code clean up.