Update: remove debug codes and add comments