Movign another function to its rightful place.
Fixing a couple issues in diff.

1. need to reset wrangler timeout before calling ChangeType.
2. using more local variables for state names.