lchen59 code documentation and removed dead code