diff --git a/rhodecode/public/css/code-block.less b/rhodecode/public/css/code-block.less
--- a/rhodecode/public/css/code-block.less
+++ b/rhodecode/public/css/code-block.less
@@ -18,15 +18,6 @@
     }
 }
 
-.compare_view_files {
-
-    .diff-container {
-
-        .diffblock {
-            margin-bottom: 0;
-        }
-    }
-}
 
 div.diffblock .sidebyside {
  background: #ffffff;
diff --git a/rhodecode/public/css/main.less b/rhodecode/public/css/main.less
--- a/rhodecode/public/css/main.less
+++ b/rhodecode/public/css/main.less
@@ -1543,14 +1543,6 @@ table.integrations {
   }
 }
 
-.compare_view_files {
-    width: 100%;
-
-    td {
-        vertical-align: middle;
-    }
-}
-
 .compare_view_filepath {
     color: @grey1;
 }
diff --git a/rhodecode/public/css/tables.less b/rhodecode/public/css/tables.less
--- a/rhodecode/public/css/tables.less
+++ b/rhodecode/public/css/tables.less
@@ -485,58 +485,6 @@ table.compare_view_commits {
     }
 }
 
-.compare_view_files {
-
-    td.td-actions {
-        text-align: right;
-    }
-
-    .flag_status {
-        margin: 0 0 0 5px;
-    }
-
-    td.injected_diff {
-
-        .code-difftable {
-            border:none;
-        }
-
-        .diff-container {
-            border: @border-thickness solid @border-default-color;
-            .border-radius(@border-radius);
-        }
-
-        div.diffblock {
-            border:none;
-        }
-
-        div.code-body {
-            max-width: 1152px;
-        }
-    }
-
-    .rctable {
-
-        td {
-            padding-top: @space;
-        }
-
-        &:first-child td {
-            padding-top: 0;
-        }
-    }
-
-    .comment-bubble,
-    .show_comments {
-        float: right;
-        visibility: hidden;
-        padding: 0 1em 0 0;
-    }
-
-    .injected_diff {
-        padding-bottom: @padding;
-    }
-}
 
 // Gist List
 #gist_list_table {
diff --git a/rhodecode/public/js/src/rhodecode.js b/rhodecode/public/js/src/rhodecode.js
--- a/rhodecode/public/js/src/rhodecode.js
+++ b/rhodecode/public/js/src/rhodecode.js
@@ -293,44 +293,27 @@ function scrollToElement(element, percen
             });
         }
     });
-    $('.compare_view_files').on(
-        'mouseenter mouseleave', 'tr.line .lineno a',function(event) {
-            if (event.type === "mouseenter") {
-                $(this).parents('tr.line').addClass('hover');
-            } else {
-                $(this).parents('tr.line').removeClass('hover');
-            }
-        });
 
-    $('.compare_view_files').on(
-        'mouseenter mouseleave', 'tr.line .add-comment-line a',function(event){
-            if (event.type === "mouseenter") {
-                $(this).parents('tr.line').addClass('commenting');
-            } else {
-                $(this).parents('tr.line').removeClass('commenting');
-            }
-        });
-
-    $('body').on( /* TODO: replace the $('.compare_view_files').on('click') below
-                    when new diffs are integrated */
-        'click', '.cb-lineno a', function(event) {
+    $('body').on('click', '.cb-lineno a', function(event) {
 
             function sortNumber(a,b) {
                 return a - b;
             }
 
-            if ($(this).attr('data-line-no') !== "") {
+            var lineNo = $(this).data('lineNo');
+            if (lineNo) {
 
                 // on shift, we do a range selection, if we got previous line
-                var prevLine = $('.cb-line-selected a').attr('data-line-no');
+                var prevLine = $('.cb-line-selected a').data('lineNo');
                 if (event.shiftKey && prevLine !== undefined) {
                     var prevLine = parseInt(prevLine);
-                    var nextLine = parseInt($(this).attr('data-line-no'));
+                    var nextLine = parseInt(lineNo);
                     var pos = [prevLine, nextLine].sort(sortNumber);
                     var anchor = '#L{0}-{1}'.format(pos[0], pos[1]);
 
                 } else {
-                    var nextLine = parseInt($(this).attr('data-line-no'));
+
+                    var nextLine = parseInt(lineNo);
                     var pos = [nextLine, nextLine];
                     var anchor = '#L{0}'.format(pos[0]);
 
@@ -352,54 +335,35 @@ function scrollToElement(element, percen
                     }
                 });
 
-                // Replace URL without jumping to it if browser supports.
-                // Default otherwise
-                if (history.pushState) {
-                    var new_location = location.href.rstrip('#');
-                    if (location.hash) {
-                        // location without hash
-                        new_location = new_location.replace(location.hash, "");
-                    }
 
-                    // Make new anchor url
-                    new_location = new_location + anchor;
-                    history.pushState(true, document.title, new_location);
-
-                    return false;
+            } else {
+                if ($(this).attr('name') !== undefined) {
+                    // clear selection
+                    $('td.cb-line-selected').removeClass('cb-line-selected');
+                    var aEl = $(this).closest('td');
+                    aEl.addClass('cb-line-selected');
+                    aEl.next('td').addClass('cb-line-selected');
                 }
             }
+
+            // Replace URL without jumping to it if browser supports.
+            // Default otherwise
+            if (history.pushState && anchor !== undefined) {
+                var new_location = location.href.rstrip('#');
+                if (location.hash) {
+                    // location without hash
+                    new_location = new_location.replace(location.hash, "");
+                }
+
+                // Make new anchor url
+                new_location = new_location + anchor;
+                history.pushState(true, document.title, new_location);
+
+                return false;
+            }
+
         });
 
-    $('.compare_view_files').on( /* TODO: replace this with .cb function above
-                                    when new diffs are integrated */
-        'click', 'tr.line .lineno a',function(event) {
-            if ($(this).text() != ""){
-                $('tr.line').removeClass('selected');
-                $(this).parents("tr.line").addClass('selected');
-
-                // Replace URL without jumping to it if browser supports.
-                // Default otherwise
-                if (history.pushState) {
-                    var new_location = location.href;
-                    if (location.hash){
-                        new_location = new_location.replace(location.hash, "");
-                    }
-
-                    // Make new anchor url
-                    var new_location = new_location+$(this).attr('href');
-                    history.pushState(true, document.title, new_location);
-
-                    return false;
-                }
-            }
-        });
-
-    $('.compare_view_files').on(
-        'click', 'tr.line .add-comment-line a',function(event) {
-            var tr = $(event.currentTarget).parents('tr.line')[0];
-            injectInlineForm(tr);
-            return false;
-        });
 
     $('.collapse_file').on('click', function(e) {
         e.stopPropagation();
diff --git a/rhodecode/public/js/src/rhodecode/comments.js b/rhodecode/public/js/src/rhodecode/comments.js
--- a/rhodecode/public/js/src/rhodecode/comments.js
+++ b/rhodecode/public/js/src/rhodecode/comments.js
@@ -475,7 +475,7 @@ var CommentsController = function() {
 
   this.getLineNumber = function(node) {
       var $node = $(node);
-      var lineNo = $node.closest('td').attr('data-line-number');
+      var lineNo = $node.closest('td').attr('data-line-no');
       if (lineNo === undefined && $node.data('commentInline')){
           lineNo = $node.data('commentLineNo')
       }
diff --git a/rhodecode/templates/codeblocks/diffs.mako b/rhodecode/templates/codeblocks/diffs.mako
--- a/rhodecode/templates/codeblocks/diffs.mako
+++ b/rhodecode/templates/codeblocks/diffs.mako
@@ -518,7 +518,7 @@ from rhodecode.lib.diffs import NEW_FILE
 
     <tr class="cb-line">
         <td class="cb-data ${action_class(line.original.action)}"
-            data-line-number="${line.original.lineno}"
+            data-line-no="${line.original.lineno}"
             >
             <div>
             %if line.original.comments:
@@ -532,7 +532,7 @@ from rhodecode.lib.diffs import NEW_FILE
             </div>
         </td>
         <td class="cb-lineno ${action_class(line.original.action)}"
-            data-line-number="${line.original.lineno}"
+            data-line-no="${line.original.lineno}"
             %if old_line_anchor:
             id="${old_line_anchor}"
             %endif
@@ -542,7 +542,7 @@ from rhodecode.lib.diffs import NEW_FILE
             %endif
         </td>
         <td class="cb-content ${action_class(line.original.action)}"
-            data-line-number="o${line.original.lineno}"
+            data-line-no="o${line.original.lineno}"
             >
             %if use_comments and line.original.lineno:
             ${render_add_comment_button()}
@@ -553,7 +553,7 @@ from rhodecode.lib.diffs import NEW_FILE
             %endif
         </td>
         <td class="cb-data ${action_class(line.modified.action)}"
-            data-line-number="${line.modified.lineno}"
+            data-line-no="${line.modified.lineno}"
             >
             <div>
             %if line.modified.comments:
@@ -567,7 +567,7 @@ from rhodecode.lib.diffs import NEW_FILE
             </div>
         </td>
         <td class="cb-lineno ${action_class(line.modified.action)}"
-            data-line-number="${line.modified.lineno}"
+            data-line-no="${line.modified.lineno}"
             %if new_line_anchor:
             id="${new_line_anchor}"
             %endif
@@ -577,7 +577,7 @@ from rhodecode.lib.diffs import NEW_FILE
             %endif
         </td>
         <td class="cb-content ${action_class(line.modified.action)}"
-            data-line-number="n${line.modified.lineno}"
+            data-line-no="n${line.modified.lineno}"
             >
             %if use_comments and line.modified.lineno:
             ${render_add_comment_button()}
@@ -615,7 +615,7 @@ from rhodecode.lib.diffs import NEW_FILE
             </div>
         </td>
         <td class="cb-lineno ${action_class(action)}"
-            data-line-number="${old_line_no}"
+            data-line-no="${old_line_no}"
             %if old_line_anchor:
             id="${old_line_anchor}"
             %endif
@@ -625,7 +625,7 @@ from rhodecode.lib.diffs import NEW_FILE
             %endif
         </td>
         <td class="cb-lineno ${action_class(action)}"
-            data-line-number="${new_line_no}"
+            data-line-no="${new_line_no}"
             %if new_line_anchor:
             id="${new_line_anchor}"
             %endif
@@ -635,7 +635,7 @@ from rhodecode.lib.diffs import NEW_FILE
             %endif
         </td>
         <td class="cb-content ${action_class(action)}"
-            data-line-number="${new_line_no and 'n' or 'o'}${new_line_no or old_line_no}"
+            data-line-no="${new_line_no and 'n' or 'o'}${new_line_no or old_line_no}"
             >
             %if use_comments:
             ${render_add_comment_button()}