added in CWM calculation (mistakenly missing from main analysis script) and cleaned up workspace