clean up, move twophase simulator from twophase directory to autodiff/.