finish Codebook and cleaned up run analysis