Add comments, and modify some variables definition