Added some comments and deleted useless variables
Fix merge conflict