Updates to analysis code