optimized analysis script; removed duplicate content from codebook
further optimizations of analysis script