Added some analysis code and scripts, some of which actually work.