var qwait = angular.module('qwait', []);

qwait.config(function ($sceProvider) {
    // TODO: This is a security issue! Remove in final version and do sane interpolation
    $sceProvider.enabled(false);
});

qwait.filter('timestamp', function() {
    return function (milliseconds) {
        return new Date(milliseconds);
    }
});

qwait.filter('queuetime', function() {
    return function (milliseconds) {
        p = Math.floor((new Date() - milliseconds)/1000);
        x = p;
        s = x % 60;
        x = Math.floor(x/60)
        m = x % 60;
        x = Math.floor(x/60)
        h = x % 24;

        return p < 86400 ? h + 'h ' + m + 'm ' + s + 's' : 'Over a day';
    }
});

@@ -411,16 +411,20 @@
         
+var 
 p = Math
@@ -477,42 +477,11 @@
     
-x = p;%0A        s = x %25 60;%0A       
+var
  x =
@@ -484,37 +484,38 @@
  x = Math.floor(
-x
+p
 /60)
+;
 %0A        m = x %25
@@ -507,16 +507,20 @@
         
+var 
 m = x %25 
@@ -551,16 +551,17 @@
 or(x/60)
+;
 %0A       
@@ -561,16 +561,20 @@
         
+var 
 h = x %25 
@@ -626,19 +626,8 @@
 + 'm
- ' + s + 's
 ' : 

Declare js variables and remove seconds