removed dead code and useless comments