Updated kd_comp.py: deleted commented out code, minor other edits