Factored out diff_snapshots from CodeEnvironment class (it didn't use any of its functionality). Added automatic generation and linking of diffs to the analyze command.