Updated analysis code.