Fix didSwitch not passing previous, current state names to callback

Also, apparently a bunch of whitespace issues in your editor ;)