Fix the problem with transitions

and clean up the code a bit
Merge branch 'master' of https://github.com/hsuh/d3Viz