removed commented code and updated some comments