Added comments, removed unused imports, and duplicate/redundant code
Added comments, removed unused imports, and duplicate/redundant code