Remove some useless codes and add some comments