Add comment and arrange some function