diff --git a/css/redactor.css b/css/redactor.css
index ea8a3820ae39bc06eae0b6d271a5dd36bbba4ddd..e6d048dba9eec977e538f1ecd8f5992d8e02539d 100644
--- a/css/redactor.css
+++ b/css/redactor.css
@@ -14,7 +14,7 @@
   position: relative;
   overflow: visible;
   overflow-x: hidden;
-  background: #ddd !important;
+  border: 1px solid #ddd;
 }
 .redactor-box textarea {
   display: block;
@@ -107,11 +107,12 @@ body .redactor-box-fullscreen {
   min-height: 80px;
   outline: none;
   white-space: normal;
-  border: 1px solid #eee;
   font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif !important;
   font-size: 14px;
   line-height: 1.6em;
-  box-shadow: 5px 0 10px -8px rgba(0,0,0,0.5);
+}
+.redactor-editor[style*='width:'] {
+  border-right: 1px dashed #999;
 }
 .redactor-editor:focus {
   outline: none;
@@ -150,8 +151,7 @@ body .redactor-box-fullscreen {
   font-size: 14px !important;
   line-height: 1 !important;
   background: #fff;
-  border: 1px solid rgba(0,0,0,0.05);
-  border-bottom: 0;
+  border: none;
   box-shadow: 0 1px 4px -2px rgba(0, 0, 0, 0.4);
 }
 .redactor-toolbar:after {
diff --git a/include/ajax.reports.php b/include/ajax.reports.php
deleted file mode 100644
index 81eb83b8d802fd60a199780fa583ff77ec49cee7..0000000000000000000000000000000000000000
--- a/include/ajax.reports.php
+++ /dev/null
@@ -1,243 +0,0 @@
-<?php
-/*********************************************************************
-    ajax.reports.php
-
-    AJAX interface for reports -- both plot and tabular data are retrievable
-    in JSON format from this utility. Please put plumbing in /scp/ajax.php
-    pattern rules.
-
-    Jared Hancock <jared@osticket.com>
-    Copyright (c)  2006-2013 osTicket
-    http://www.osticket.com
-
-    Released under the GNU General Public License WITHOUT ANY WARRANTY.
-    See LICENSE.TXT for details.
-
-    vim: expandtab sw=4 ts=4 sts=4:
-**********************************************************************/
-
-if(!defined('INCLUDE_DIR')) die('403');
-
-include_once(INCLUDE_DIR.'class.ticket.php');
-include_once(INCLUDE_DIR.'class.report.php');
-
-/**
- * Overview Report
- *
- * The overview report allows for the display of basic ticket statistics in
- * both graphical and tabular formats.
- */
-class OverviewReportAjaxAPI extends AjaxController {
-    function enumTabularGroups() {
-        return $this->encode(array("dept"=>__("Department"), "topic"=>__("Topics"),
-            # XXX: This will be relative to permissions based on the
-            # logged-in-staff. For basic staff, this will be 'My Stats'
-            "staff"=>__("Agent")));
-    }
-
-    function getData() {
-        global $thisstaff;
-
-        list($start, $stop) = $this->_getDateRange();
-
-        $groups = array(
-            "dept" => array(
-                "table" => DEPT_TABLE,
-                "pk" => "id",
-                "fpk" => "dept_id",
-                "sort" => 'T1.name',
-                "fields" => 'T1.name',
-                "headers" => array(__('Department')),
-                "filter" => ('T1.id IN ('.implode(',', db_input($thisstaff->getDepts())).')')
-            ),
-            "topic" => array(
-                "table" => TOPIC_TABLE,
-                "pk" => "topic_id",
-                "sort" => 'name',
-                "fields" => "CONCAT_WS(' / ',"
-                    ."(SELECT P.topic FROM ".TOPIC_TABLE." P WHERE P.topic_id = T1.topic_pid),"
-                    ."T1.topic) as name ",
-                "headers" => array(__('Help Topic')),
-                "filter" => '1'
-            ),
-            "staff" => array(
-                "table" => STAFF_TABLE,
-                "pk" => 'staff_id',
-                "sort" => 'name',
-                "fields" => "CONCAT_WS(' ', T1.firstname, T1.lastname) as name",
-                "headers" => array(__('Agent')),
-                "filter" =>
-                    ('T1.staff_id=S1.staff_id
-                      AND
-                      (T1.staff_id='.db_input($thisstaff->getId())
-                        .(($depts=$thisstaff->getManagedDepartments())?
-                            (' OR T1.dept_id IN('.implode(',', db_input($depts)).')'):'')
-                        .($thisstaff->hasPerm(ReportModel::PERM_AGENTS)?
-                            (' OR T1.dept_id IN('.implode(',', db_input($thisstaff->getDepts())).')'):'')
-                     .')'
-                     )
-            )
-        );
-        $group = $this->get('group', 'dept');
-        $info = isset($groups[$group])?$groups[$group]:$groups['dept'];
-
-        # XXX: Die if $group not in $groups
-        $info['fpk'] = $info['fpk'] ?: $info['pk'];
-        $queries=array(
-            array(5, 'SELECT '.$info['fields'].',
-                COUNT(*)-COUNT(NULLIF(A1.state, "created")) AS Opened,
-                COUNT(*)-COUNT(NULLIF(A1.state, "assigned")) AS Assigned,
-                COUNT(*)-COUNT(NULLIF(A1.state, "overdue")) AS Overdue,
-                COUNT(*)-COUNT(NULLIF(A1.state, "closed")) AS Closed,
-                COUNT(*)-COUNT(NULLIF(A1.state, "reopened")) AS Reopened
-            FROM '.$info['table'].' T1
-                LEFT JOIN '.THREAD_EVENT_TABLE.' A1
-                    ON (A1.'.$info['fpk'].'=T1.'.$info['pk'].'
-                         AND NOT annulled
-                         AND (A1.timestamp BETWEEN '.$start.' AND '.$stop.'))
-                LEFT JOIN '.STAFF_TABLE.' S1 ON (S1.staff_id=A1.staff_id)
-            WHERE '.$info['filter'].'
-            GROUP BY T1.'.$info['pk'].'
-            ORDER BY '.$info['sort']),
-
-            array(1, 'SELECT '.$info['fields'].',
-                FORMAT(AVG(DATEDIFF(T2.closed, T2.created)),1) AS ServiceTime
-            FROM '.$info['table'].' T1
-                LEFT JOIN '.TICKET_TABLE.' T2 ON (T2.'.$info['fpk'].'=T1.'.$info['pk'].')
-                LEFT JOIN '.STAFF_TABLE.' S1 ON (S1.staff_id=T2.staff_id)
-            WHERE '.$info['filter'].' AND T2.closed BETWEEN '.$start.' AND '.$stop.'
-            GROUP BY T1.'.$info['pk'].'
-            ORDER BY '.$info['sort']),
-
-            array(1, 'SELECT '.$info['fields'].',
-                FORMAT(AVG(DATEDIFF(B2.created, B1.created)),1) AS ResponseTime
-            FROM '.$info['table'].' T1
-                LEFT JOIN '.TICKET_TABLE.' T2 ON (T2.'.$info['fpk'].'=T1.'.$info['pk'].')
-                LEFT JOIN '.THREAD_TABLE.' B0 ON (B0.object_id=T2.ticket_id
-                    AND B0.object_type="T")
-                LEFT JOIN '.THREAD_ENTRY_TABLE.' B2 ON (B2.thread_id = B0.id
-                    AND B2.`type`="R")
-                LEFT JOIN '.THREAD_ENTRY_TABLE.' B1 ON (B2.pid = B1.id)
-                LEFT JOIN '.STAFF_TABLE.' S1 ON (S1.staff_id=B2.staff_id)
-            WHERE '.$info['filter'].' AND B1.created BETWEEN '.$start.' AND '.$stop.'
-            GROUP BY T1.'.$info['pk'].'
-            ORDER BY '.$info['sort'])
-        );
-        $rows = array();
-        $cols = 1;
-        foreach ($queries as $q) {
-            list($c, $sql) = $q;
-            $res = db_query($sql);
-            $cols += $c;
-            while ($row = db_fetch_row($res)) {
-                $found = false;
-                foreach ($rows as &$r) {
-                    if ($r[0] == $row[0]) {
-                        $r = array_merge($r, array_slice($row, -$c));
-                        $found = true;
-                        break;
-                    }
-                }
-                if (!$found)
-                    $rows[] = array_merge(array($row[0]), array_slice($row, -$c));
-            }
-            # Make sure each row has the same number of items
-            foreach ($rows as &$r)
-                while (count($r) < $cols)
-                    $r[] = null;
-        }
-        return array("columns" => array_merge($info['headers'],
-                        array(__('Opened'),__('Assigned'),__('Overdue'),__('Closed'),__('Reopened'),
-                              __('Service Time'),__('Response Time'))),
-                     "data" => $rows);
-    }
-
-    function getTabularData() {
-        return $this->encode($this->getData());
-    }
-
-    function downloadTabularData() {
-        $data = $this->getData();
-        $csv = '"' . implode('","',$data['columns']) . '"';
-        foreach ($data['data'] as $row)
-            $csv .= "\n" . '"' . implode('","', $row) . '"';
-        Http::download(
-            sprintf('%s-report.csv', $this->get('group', __('Department'))),
-            'text/csv', $csv);
-    }
-
-    function _getDateRange() {
-        global $cfg;
-
-        if(($start = $this->get('start', 'last month'))) {
-            $stop = $this->get('period', 'now');
-        } else {
-            $start = 'last month';
-            $stop = $this->get('period', 'now');
-        }
-
-       $start = strtotime($start);
-
-        if (substr($stop, 0, 1) == '+')
-            $stop = strftime('%Y-%m-%d ', $start) . $stop;
-
-        $start = 'FROM_UNIXTIME('.$start.')';
-        $stop = 'FROM_UNIXTIME('.strtotime($stop).')';
-
-        return array($start, $stop);
-    }
-
-    function getPlotData() {
-        list($start, $stop) = $this->_getDateRange();
-
-        # Fetch all types of events over the timeframe
-        $res = db_query('SELECT DISTINCT(state) FROM '.THREAD_EVENT_TABLE
-            .' WHERE timestamp BETWEEN '.$start.' AND '.$stop
-            .' AND state IN ("created", "closed", "reopened", "assigned", "overdue", "transferred")'
-            .' ORDER BY 1');
-        $events = array();
-        while ($row = db_fetch_row($res)) $events[] = $row[0];
-
-        # TODO: Handle user => db timezone offset
-        # XXX: Implement annulled column from the %ticket_event table
-        $res = db_query('SELECT state, DATE_FORMAT(timestamp, \'%Y-%m-%d\'), '
-                .'COUNT(DISTINCT T.id)'
-            .' FROM '.THREAD_EVENT_TABLE. ' E '
-            .' JOIN '.THREAD_TABLE. ' T
-                ON (T.id = E.thread_id AND T.object_type = "T") '
-            .' WHERE E.timestamp BETWEEN '.$start.' AND '.$stop
-            .' AND NOT annulled'
-            .' AND E.state IN ("created", "closed", "reopened", "assigned", "overdue", "transferred")'
-            .' GROUP BY E.state, DATE_FORMAT(E.timestamp, \'%Y-%m-%d\')'
-            .' ORDER BY 2, 1');
-        # Initialize array of plot values
-        $plots = array();
-        foreach ($events as $e) { $plots[$e] = array(); }
-
-        $time = null; $times = array();
-        # Iterate over result set, adding zeros for missing ticket events
-        $slots = array();
-        while ($row = db_fetch_row($res)) {
-            $row_time = strtotime($row[1]);
-            if ($time != $row_time) {
-                # New time (and not the first), figure out which events did
-                # not have any tickets associated for this time slot
-                if ($time !== null) {
-                    # Not the first record -- add zeros all the arrays that
-                    # did not have at least one entry for the timeframe
-                    foreach (array_diff($events, $slots) as $slot)
-                        $plots[$slot][] = 0;
-                }
-                $slots = array();
-                $times[] = $time = $row_time;
-            }
-            # Keep track of states for this timeframe
-            $slots[] = $row[0];
-            $plots[$row[0]][] = (int)$row[2];
-        }
-        foreach (array_diff($events, $slots) as $slot)
-            $plots[$slot][] = 0;
-        return $this->encode(array("times" => $times, "plots" => $plots,
-            "events"=>$events));
-    }
-}
diff --git a/include/class.dept.php b/include/class.dept.php
index d33b1bb1289ea917043017c3e18e8eba97857a3d..502c34742ccf9610968faaf833c619e3d6b6ac1c 100644
--- a/include/class.dept.php
+++ b/include/class.dept.php
@@ -112,6 +112,9 @@ implements TemplateVariable {
         $T = CustomDataTranslation::translate($tag);
         return $T != $tag ? $T : $default;
     }
+    static function getLocalNameById($id, $default) {
+        return static::getLocalById($id, 'name', $default);
+    }
 
     function getTranslateTag($subtag='name') {
         return _H(sprintf('dept.%s.%s', $subtag, $this->getId()));
diff --git a/include/class.filter.php b/include/class.filter.php
index ada35a25994684acda91afb84421b7090adc1206..0febfb896d72eefa2c22d6833693f44accf7163d 100644
--- a/include/class.filter.php
+++ b/include/class.filter.php
@@ -176,20 +176,6 @@ class Filter {
         return $this->ht['rules'];
     }
 
-    function getFlatRules() { //Format used on html... I'm ashamed
-
-        $info=array();
-        if(($rules=$this->getRules())) {
-            foreach($rules as $k=>$rule) {
-                $i=$k+1;
-                $info["rule_w$i"]=$rule['w'];
-                $info["rule_h$i"]=$rule['h'];
-                $info["rule_v$i"]=$rule['v'];
-            }
-        }
-        return $info;
-    }
-
     function addRule($what, $how, $val,$extra=array()) {
         $errors = array();
 
@@ -410,36 +396,36 @@ class Filter {
         $types = array_keys(self::getSupportedMatchTypes());
 
         $rules=array();
-        for($i=1; $i<=25; $i++) { //Expecting no more than 25 rules...
-            if($vars["rule_w$i"] || $vars["rule_h$i"]) {
+        foreach ($vars['rules'] as $i=>$rule) {
+            if($rule["w"] || $rule["h"]) {
                 // Check for REGEX compile errors
-                if (in_array($vars["rule_h$i"], array('match','not_match'))) {
-                    $wrapped = "/".$vars["rule_v$i"]."/iu";
-                    if (false === @preg_match($vars["rule_v$i"], ' ')
+                if (in_array($rule["h"], array('match','not_match'))) {
+                    $wrapped = "/".$rule["v"]."/iu";
+                    if (false === @preg_match($rule["v"], ' ')
                             && (false !== @preg_match($wrapped, ' ')))
-                        $vars["rule_v$i"] = $wrapped;
+                        $rule["v"] = $wrapped;
                 }
 
-                if(!$vars["rule_w$i"] || !in_array($vars["rule_w$i"],$matches))
+                if(!$rule["w"] || !in_array($rule["w"],$matches))
                     $errors["rule_$i"]=__('Invalid match selection');
-                elseif(!$vars["rule_h$i"] || !in_array($vars["rule_h$i"],$types))
+                elseif(!$rule["h"] || !in_array($rule["h"],$types))
                     $errors["rule_$i"]=__('Invalid match type selection');
-                elseif(!$vars["rule_v$i"])
+                elseif(!$rule["v"])
                     $errors["rule_$i"]=__('Value required');
-                elseif($vars["rule_w$i"]=='email'
-                        && $vars["rule_h$i"]=='equal'
-                        && !Validator::is_email($vars["rule_v$i"]))
+                elseif($rule["w"]=='email'
+                        && $rule["h"]=='equal'
+                        && !Validator::is_email($rule["v"]))
                     $errors["rule_$i"]=__('Valid email required for the match type');
-                elseif (in_array($vars["rule_h$i"], array('match','not_match'))
-                        && (false === @preg_match($vars["rule_v$i"], ' ')))
+                elseif (in_array($rule["h"], array('match','not_match'))
+                        && (false === @preg_match($rule["v"], ' ')))
                     $errors["rule_$i"] = sprintf(__('Regex compile error: (#%s)'),
                         preg_last_error());
 
 
                 else //for everything-else...we assume it's valid.
-                    $rules[]=array('what'=>$vars["rule_w$i"],
-                        'how'=>$vars["rule_h$i"],'val'=>trim($vars["rule_v$i"]));
-            }elseif($vars["rule_v$i"]) {
+                    $rules[]=array('what'=>$rule["w"],
+                        'how'=>$rule["h"],'val'=>trim($rule["v"]));
+            }elseif($rule["v"]) {
                 $errors["rule_$i"]=__('Incomplete selection');
             }
         }
diff --git a/include/class.orm.php b/include/class.orm.php
index a774fc65ea3a51b6ce6d80753f49b6fea7d1dd62..44d292f664038f825478fc01bc6e2e848e78e4aa 100644
--- a/include/class.orm.php
+++ b/include/class.orm.php
@@ -1806,7 +1806,7 @@ class SqlCompiler {
     static function splitCriteria($criteria) {
         static $operators = array(
             'exact' => 1, 'isnull' => 1,
-            'gt' => 1, 'lt' => 1, 'gte' => 1, 'lte' => 1,
+            'gt' => 1, 'lt' => 1, 'gte' => 1, 'lte' => 1, 'range' => 1,
             'contains' => 1, 'like' => 1, 'startswith' => 1, 'endswith' => 1, 'regex' => 1,
             'in' => 1, 'intersect' => 1,
             'hasbit' => 1,
@@ -2199,6 +2199,7 @@ class MySqlCompiler extends SqlCompiler {
         'lt' => '%1$s < %2$s',
         'gte' => '%1$s >= %2$s',
         'lte' => '%1$s <= %2$s',
+        'range' => array('self', '__range'),
         'isnull' => array('self', '__isnull'),
         'like' => '%1$s LIKE %2$s',
         'hasbit' => '%1$s & %2$s != 0',
@@ -2273,6 +2274,11 @@ class MySqlCompiler extends SqlCompiler {
         return sprintf('%s REGEXP %s', $a, $this->input($b));
     }
 
+    function __range($a, $b) {
+        // XXX: Crash if $b is not array of two items
+        return sprintf('%s BETWEEN %s AND %s', $a, $b[0], $b[1]);
+    }
+
     function compileJoin($tip, $model, $alias, $info, $extra=false) {
         $constraints = array();
         $join = ' JOIN ';
diff --git a/include/class.report.php b/include/class.report.php
index 059325b3f44a69c1905582ba1826a8594ad93dc1..efa078001d6d60154236e59b7590160a7630d233 100644
--- a/include/class.report.php
+++ b/include/class.report.php
@@ -19,4 +19,204 @@ class ReportModel {
 }
 
 RolePermission::register(/* @trans */ 'Miscellaneous', ReportModel::getPermissions());
-?>
+
+class OverviewReport {
+    var $start;
+    var $end;
+
+    function __construct($start, $end='now') {
+        $this->start = $start;
+        $this->end = $end;
+    }
+
+    function getDateRange() {
+        global $cfg;
+
+        $start = $this->start ?: 'last month';
+        $stop = $this->end ?: 'now';
+
+        $start = strtotime($start);
+
+        if (substr($stop, 0, 1) == '+')
+            $stop = strftime('%Y-%m-%d ', $start) . $stop;
+
+        $start = 'FROM_UNIXTIME('.$start.')';
+        $stop = 'FROM_UNIXTIME('.strtotime($stop).')';
+
+        return array($start, $stop);
+    }
+
+    function getPlotData() {
+        list($start, $stop) = $this->getDateRange();
+
+        # Fetch all types of events over the timeframe
+        $res = db_query('SELECT DISTINCT(state) FROM '.THREAD_EVENT_TABLE
+            .' WHERE timestamp BETWEEN '.$start.' AND '.$stop
+            .' AND state IN ("created", "closed", "reopened", "assigned", "overdue", "transferred")'
+            .' ORDER BY 1');
+        $events = array();
+        while ($row = db_fetch_row($res)) $events[] = $row[0];
+
+        # TODO: Handle user => db timezone offset
+        # XXX: Implement annulled column from the %ticket_event table
+        $res = db_query('SELECT state, DATE_FORMAT(timestamp, \'%Y-%m-%d\'), '
+                .'COUNT(DISTINCT T.id)'
+            .' FROM '.THREAD_EVENT_TABLE. ' E '
+            .' JOIN '.THREAD_TABLE. ' T
+                ON (T.id = E.thread_id AND T.object_type = "T") '
+            .' WHERE E.timestamp BETWEEN '.$start.' AND '.$stop
+            .' AND NOT annulled'
+            .' AND E.state IN ("created", "closed", "reopened", "assigned", "overdue", "transferred")'
+            .' GROUP BY E.state, DATE_FORMAT(E.timestamp, \'%Y-%m-%d\')'
+            .' ORDER BY 2, 1');
+        # Initialize array of plot values
+        $plots = array();
+        foreach ($events as $e) { $plots[$e] = array(); }
+
+        $time = null; $times = array();
+        # Iterate over result set, adding zeros for missing ticket events
+        $slots = array();
+        while ($row = db_fetch_row($res)) {
+            $row_time = strtotime($row[1]);
+            if ($time != $row_time) {
+                # New time (and not the first), figure out which events did
+                # not have any tickets associated for this time slot
+                if ($time !== null) {
+                    # Not the first record -- add zeros all the arrays that
+                    # did not have at least one entry for the timeframe
+                    foreach (array_diff($events, $slots) as $slot)
+                        $plots[$slot][] = 0;
+                }
+                $slots = array();
+                $times[] = $time = $row_time;
+            }
+            # Keep track of states for this timeframe
+            $slots[] = $row[0];
+            $plots[$row[0]][] = (int)$row[2];
+        }
+        foreach (array_diff($events, $slots) as $slot)
+            $plots[$slot][] = 0;
+
+        return array("times" => $times, "plots" => $plots, "events" => $events);
+    }
+
+    function enumTabularGroups() {
+        return array("dept"=>__("Department"), "topic"=>__("Topics"),
+            # XXX: This will be relative to permissions based on the
+            # logged-in-staff. For basic staff, this will be 'My Stats'
+            "staff"=>__("Agent"));
+    }
+
+    function getTabularData($group='dept') {
+        global $thisstaff;
+
+        list($start, $stop) = $this->getDateRange();
+        $times = Ticket::objects()
+            ->constrain(array(
+                'thread__entries' => array(
+                    'thread__entries__type' => 'R'
+                ),
+            ))
+            ->aggregate(array(
+                'ServiceTime' => SqlAggregate::AVG(SqlFunction::DATEDIFF(
+                    new SqlField('closed'), new SqlField('created')
+                )),
+                'ResponseTime' => SqlAggregate::AVG(SqlFunction::DATEDIFF(
+                    new SqlField('thread__entries__created'), new SqlField('thread__entries__parent__created')
+                )),
+            ));
+
+        $stats = Ticket::objects()
+            ->constrain(array(
+                'thread__events' => array(
+                    'thread__events__annulled' => 0,
+                    'thread__events__timestamp__range' => array($start, $stop),
+                ),
+            ))
+            ->aggregate(array(
+                'Opened' => SqlAggregate::COUNT(
+                    SqlCase::N()
+                        ->when(new Q(array('thread__events__state' => 'created')), 1)
+                ),
+                'Assigned' => SqlAggregate::COUNT(
+                    SqlCase::N()
+                        ->when(new Q(array('thread__events__state' => 'assigned')), 1)
+                ),
+                'Overdue' => SqlAggregate::COUNT(
+                    SqlCase::N()
+                        ->when(new Q(array('thread__events__state' => 'overdue')), 1)
+                ),
+                'Closed' => SqlAggregate::COUNT(
+                    SqlCase::N()
+                        ->when(new Q(array('thread__events__state' => 'closed')), 1)
+                ),
+                'Reopened' => SqlAggregate::COUNT(
+                    SqlCase::N()
+                        ->when(new Q(array('thread__events__state' => 'reopened')), 1)
+                ),
+            ));
+
+        switch ($group) {
+        case 'dept':
+            $headers = array(__('Department'));
+            $header = function($row) { return Dept::getLocalNameById($row['dept_id'], $row['dept__name']); };
+            $pk = 'dept_id';
+            $stats = $stats
+                ->filter(array('dept_id__in' => $thisstaff->getDepts()))
+                ->values('dept__id', 'dept__name');
+            $times = $times
+                ->filter(array('dept_id__in' => $thisstaff->getDepts()))
+                ->values('dept__id');
+            break;
+        case 'topic':
+            $headers = array(__('Help Topic'));
+            $header = function($row) { return Topic::getLocalNameById($row['topic_id'], $row['topic__topic']); };
+            $pk = 'topic_id';
+            $stats = $stats
+                ->values('topic_id', 'topic__topic')
+                ->filter(array('topic_id__gt' => 0));
+            $times = $times
+                ->values('topic_id')
+                ->filter(array('topic_id__gt' => 0));
+            break;
+        case 'staff':
+            $headers = array(__('Agent'));
+            $header = function($row) { return new AgentsName(array(
+                'first' => $row['staff__firstname'], 'last' => $row['staff__lastname'])); };
+            $pk = 'staff_id';
+            $stats = $stats->values('staff_id', 'staff__firstname', 'staff__lastname');
+            $times = $times->values('staff_id');
+            $depts = $thisstaff->getManagedDepartments();
+            if ($thisstaff->hasPerm(ReportModel::PERM_AGENTS))
+                $depts = array_merge($depts, $thisstaff->getDepts());
+            $Q = Q::any(array(
+                'staff_id' => $thisstaff->getId(),
+            ));
+            if ($depts)
+                $Q->add(array('dept_id__in' => $depts));
+            $stats = $stats->filter(array('staff_id__gt'=>0))->filter($Q);
+            $times = $times->filter(array('staff_id__gt'=>0))->filter($Q);
+            break;
+        default:
+            # XXX: Die if $group not in $groups
+        }
+
+        $timings = array();
+        foreach ($times as $T) {
+            $timings[$T[$pk]] = $T;
+        }
+
+        $rows = array();
+        foreach ($stats as $R) {
+            $T = $timings[$R[$pk]];
+            $rows[] = array($header($R), $R['Opened'], $R['Assigned'],
+                $R['Overdue'], $R['Closed'], $R['Reopened'],
+                number_format($T['ServiceTime'], 1),
+                number_format($T['ResponseTime'], 1));
+        }
+        return array("columns" => array_merge($headers,
+                        array(__('Opened'),__('Assigned'),__('Overdue'),__('Closed'),__('Reopened'),
+                              __('Service Time'),__('Response Time'))),
+                     "data" => $rows);
+    }
+}
diff --git a/include/class.topic.php b/include/class.topic.php
index 557daf533311caf66da3d51b269bb04c7dd2e1d3..d448ea7ec10279dfef915674ee253d50e785efa5 100644
--- a/include/class.topic.php
+++ b/include/class.topic.php
@@ -371,6 +371,11 @@ implements TemplateVariable {
         return self::getHelpTopics(false, true, $localize);
     }
 
+    static function getLocalNameById($id) {
+        $topics = static::getHelpTopics(false, true);
+        return $topics[$id];
+    }
+
     static function getIdByName($name, $pid=0) {
         $list = self::objects()->filter(array(
             'topic'=>$name,
diff --git a/include/client/profile.inc.php b/include/client/profile.inc.php
index 713551110b2acfdcb8f4cd26b0c65043e3fcf933..5a72f571033c02035b16c1505a4ca1f4d90dd749 100644
--- a/include/client/profile.inc.php
+++ b/include/client/profile.inc.php
@@ -54,7 +54,7 @@ $selected = ($info['lang'] == $l['code']) ? 'selected="selected"' : ''; ?>
 <?php }
       if ($acct->isPasswdResetEnabled()) { ?>
 <tr>
-    <td colspan=2">
+    <td colspan="2">
         <div><hr><h3><?php echo __('Access Credentials'); ?></h3></div>
     </td>
 </tr>
diff --git a/include/client/view.inc.php b/include/client/view.inc.php
index 97c3bb8ef5eb52e5d279b44aeee57da46a7604b5..ca9aa363cf15eafddda628f7ee3998546b61fc83 100644
--- a/include/client/view.inc.php
+++ b/include/client/view.inc.php
@@ -17,7 +17,7 @@ if ($thisclient && $thisclient->isGuest()
 
 <div id="msg_info">
     <i class="icon-compass icon-2x pull-left"></i>
-    <strong><?php echo __('Looking for your other tickets?'); ?></strong></br>
+    <strong><?php echo __('Looking for your other tickets?'); ?></strong><br />
     <a href="<?php echo ROOT_PATH; ?>login.php?e=<?php
         echo urlencode($thisclient->getEmail());
     ?>" style="text-decoration:underline"><?php echo __('Sign In'); ?></a>
@@ -32,7 +32,7 @@ if ($thisclient && $thisclient->isGuest()
         <td colspan="2" width="100%">
             <h1>
                 <a href="tickets.php?id=<?php echo $ticket->getId(); ?>" title="<?php echo __('Reload'); ?>"><i class="refresh icon-refresh"></i></a>
-                <b><?php echo $ticket->getSubject(); ?></b>
+                <b><?php echo Format::htmlchars($ticket->getSubject()); ?></b>
                 <small>#<?php echo $ticket->getNumber(); ?></small>
 <div class="pull-right">
     <a class="action-button" href="tickets.php?a=print&id=<?php
diff --git a/include/ost-sampleconfig.php b/include/ost-sampleconfig.php
deleted file mode 100644
index 0b26400698271c1d89ab46f55a209d501b5b1dae..0000000000000000000000000000000000000000
--- a/include/ost-sampleconfig.php
+++ /dev/null
@@ -1,129 +0,0 @@
-<?php
-/*********************************************************************
-    ost-config.php
-
-    Static osTicket configuration file. Mainly useful for mysql login info.
-    Created during installation process and shouldn't change even on upgrades.
-
-    Peter Rotich <peter@osticket.com>
-    Copyright (c)  2006-2010 osTicket
-    http://www.osticket.com
-
-    Released under the GNU General Public License WITHOUT ANY WARRANTY.
-    See LICENSE.TXT for details.
-
-    vim: expandtab sw=4 ts=4 sts=4:
-    $Id: $
-**********************************************************************/
-
-#Disable direct access.
-if(!strcasecmp(basename($_SERVER['SCRIPT_NAME']),basename(__FILE__)) || !defined('INCLUDE_DIR'))
-    die('kwaheri rafiki!');
-
-#Install flag
-define('OSTINSTALLED',FALSE);
-if(OSTINSTALLED!=TRUE){
-    if(!file_exists(ROOT_DIR.'setup/install.php')) die('Error: Contact system admin.'); //Something is really wrong!
-    //Invoke the installer.
-    header('Location: '.ROOT_PATH.'setup/install.php');
-    exit;
-}
-
-# Encrypt/Decrypt secret key - randomly generated during installation.
-define('SECRET_SALT','%CONFIG-SIRI');
-
-#Default admin email. Used only on db connection issues and related alerts.
-define('ADMIN_EMAIL','%ADMIN-EMAIL');
-
-# Database Options
-# ---------------------------------------------------
-# Mysql Login info
-define('DBTYPE','mysql');
-define('DBHOST','%CONFIG-DBHOST');
-define('DBNAME','%CONFIG-DBNAME');
-define('DBUSER','%CONFIG-DBUSER');
-define('DBPASS','%CONFIG-DBPASS');
-
-# Table prefix
-define('TABLE_PREFIX','%CONFIG-PREFIX');
-
-#
-# SSL Options
-# ---------------------------------------------------
-# SSL options for MySQL can be enabled by adding a certificate allowed by
-# the database server here. To use SSL, you must have a client certificate
-# signed by a CA (certificate authority). You can easily create this
-# yourself with the EasyRSA suite. Give the public CA certificate, and both
-# the public and private parts of your client certificate below.
-#
-# Once configured, you can ask MySQL to require the certificate for
-# connections:
-#
-# > create user osticket;
-# > grant all on osticket.* to osticket require subject '<subject>';
-#
-# More information (to-be) available in doc/security/hardening.md
-
-# define('DBSSLCA','/path/to/ca.crt');
-# define('DBSSLCERT','/path/to/client.crt');
-# define('DBSSLKEY','/path/to/client.key');
-
-#
-# Mail Options
-# ---------------------------------------------------
-# Option: MAIL_EOL (default: \n)
-#
-# Some mail setups do not handle emails with \r\n (CRLF) line endings for
-# headers and base64 and quoted-response encoded bodies. This is an error
-# and a violation of the internet mail RFCs. However, because this is also
-# outside the control of both osTicket development and many server
-# administrators, this option can be adjusted for your setup. Many folks who
-# experience blank or garbled email from osTicket can adjust this setting to
-# use "\n" (LF) instead of the CRLF default.
-#
-# References:
-# http://www.faqs.org/rfcs/rfc2822.html
-# https://github.com/osTicket/osTicket-1.8/issues/202
-# https://github.com/osTicket/osTicket-1.8/issues/700
-# https://github.com/osTicket/osTicket-1.8/issues/759
-# https://github.com/osTicket/osTicket-1.8/issues/1217
-
-# define(MAIL_EOL, "\r\n");
-
-#
-# HTTP Server Options
-# ---------------------------------------------------
-# Option: ROOT_PATH (default: <auto detect>, fallback: /)
-#
-# If you have a strange HTTP server configuration and osTicket cannot
-# discover the URL path of where your osTicket is installed, define
-# ROOT_PATH here.
-#
-# The ROOT_PATH is the part of the URL used to access your osTicket
-# helpdesk before the '/scp' part and after the hostname. For instance, for
-# http://mycompany.com/support', the ROOT_PATH should be '/support/'
-#
-# ROOT_PATH *must* end with a forward-slash!
-
-# define('ROOT_PATH', '/support/');
-
-#
-# Session Storage Options
-# ---------------------------------------------------
-# Option: SESSION_BACKEND (default: db)
-#
-# osTicket supports Memcache as a session storage backend if the `memcache`
-# pecl extesion is installed. This also requires MEMCACHE_SERVERS to be
-# configured as well.
-#
-# MEMCACHE_SERVERS can be defined as a comma-separated list of host:port
-# specifications. If more than one server is listed, the session is written
-# to all of the servers for redundancy.
-#
-# Values: 'db' (default)
-#         'memcache' (Use Memcache servers)
-#         'system' (use PHP settings as configured (not recommended!))
-#
-# define('SESSION_BACKEND', 'memcache');
-# define('MEMCACHE_SERVERS', 'server1:11211,server2:11211');
-?>
diff --git a/include/staff/apikey.inc.php b/include/staff/apikey.inc.php
index 5096c5150de3f59caf061b2830802909aca0460a..9a39b814f82544ef7ea26bb0b002a9e29b409450 100644
--- a/include/staff/apikey.inc.php
+++ b/include/staff/apikey.inc.php
@@ -22,14 +22,16 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
  <input type="hidden" name="id" value="<?php echo $info['id']; ?>">
- <h2><?php echo __('API Key');?>
+ <h2><?php echo $title; ?>
+    <?php if (isset($info['ipaddr'])) { ?><small>
+    — <?php echo $info['ipaddr']; ?></small>
+    <?php } ?>
     <i class="help-tip icon-question-sign" href="#api_key"></i>
     </h2>
  <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
     <thead>
         <tr>
             <th colspan="2">
-                <h4><?php echo $title; ?></h4>
                 <em><?php echo __('API Key is auto-generated. Delete and re-add to change the key.');?></em>
             </th>
         </tr>
@@ -101,7 +103,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
         </tr>
         <tr>
             <th colspan="2">
-                <em><strong><?php echo __('Admin Notes');?></strong>: <?php echo __('Internal notes.');?>&nbsp;</em>
+                <em><strong><?php echo __('Internal Notes');?></strong>: <?php echo __("be liberal, they're internal");?></em>
             </th>
         </tr>
         <tr>
@@ -112,7 +114,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
         </tr>
     </tbody>
 </table>
-<p style="padding-left:225px;">
+<p style="text-align:center">
     <input type="submit" name="submit" value="<?php echo $submit_text; ?>">
     <input type="reset"  name="reset"  value="<?php echo __('Reset');?>">
     <input type="button" name="cancel" value="<?php echo __('Cancel');?>" onclick='window.location.href="apikeys.php"'>
diff --git a/include/staff/apikeys.inc.php b/include/staff/apikeys.inc.php
index 749db038e9953a842fb09f74edd58d29fd0effb9..2fd02c9021e2b7f48c1d83eb95f9605626c9cfc1 100644
--- a/include/staff/apikeys.inc.php
+++ b/include/staff/apikeys.inc.php
@@ -41,44 +41,55 @@ else
 
 ?>
 <form action="apikeys.php" method="POST" name="keys">
-
-<div class="pull-left" style="padding-top:5px;">
- <h2><?php echo __('API Keys');?></h2>
-</div>
-<div class="pull-right flush-right" style="padding-top:5px;padding-right:5px;">
-    <a href="apikeys.php?a=add" class="green button action-button"><i class="icon-plus-sign"></i> <?php echo __('Add New API Key');?></a>
-    <span class="action-button" data-dropdown="#action-dropdown-more">
-       <i class="icon-caret-down pull-right"></i>
-        <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
-    </span>
-     <div id="action-dropdown-more" class="action-dropdown anchor-right">
-        <ul id="actions">
-          <li><a class="confirm" data-name="enable" href="apikeys.php?a=enable">
-            <i class="icon-ok-sign icon-fixed-width"></i>
-            <?php echo __('Enable'); ?></a></li>
-          <li><a class="confirm" data-name="disable" href="apikeys.php?a=disable">
-            <i class="icon-ban-circle icon-fixed-width"></i>
-            <?php echo __('Disable'); ?></a></li>
-          <li class="danger"><a class="confirm" data-name="delete" href="apikeys.php?a=delete">
-            <i class="icon-trash icon-fixed-width"></i>
-            <?php echo __('Delete'); ?></a></li>
-        </ul>
+    <div class="sticky bar opaque">
+        <div class="content">
+            <div class="pull-left flush-left">
+                <h2><?php echo __('API Keys');?></h2>
+            </div>
+            <div class="pull-right">
+                <a href="apikeys.php?a=add" class="green button action-button"><i class="icon-plus-sign"></i> <?php echo __('Add New API Key');?></a>
+                <span class="action-button" data-dropdown="#action-dropdown-more">
+                            <i class="icon-caret-down pull-right"></i>
+                            <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
+                </span>
+                <div id="action-dropdown-more" class="action-dropdown anchor-right">
+                    <ul id="actions">
+                        <li>
+                            <a class="confirm" data-name="enable" href="apikeys.php?a=enable">
+                                <i class="icon-ok-sign icon-fixed-width"></i>
+                                <?php echo __( 'Enable'); ?>
+                            </a>
+                        </li>
+                        <li>
+                            <a class="confirm" data-name="disable" href="apikeys.php?a=disable">
+                                <i class="icon-ban-circle icon-fixed-width"></i>
+                                <?php echo __( 'Disable'); ?>
+                            </a>
+                        </li>
+                        <li class="danger">
+                            <a class="confirm" data-name="delete" href="apikeys.php?a=delete">
+                                <i class="icon-trash icon-fixed-width"></i>
+                                <?php echo __( 'Delete'); ?>
+                            </a>
+                        </li>
+                    </ul>
+                </div>
+            </div>
+        </div>
     </div>
-</div>
-<div class="clear"></div>
+    <div class="clear"></div>
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="mass_process" >
 <input type="hidden" id="action" name="a" value="" >
  <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
-    <caption><?php echo $showing; ?></caption>
     <thead>
         <tr>
-            <th width="7">&nbsp;</th>
-            <th width="320"><a <?php echo $key_sort; ?> href="apikeys.php?<?php echo $qstr; ?>&sort=key"><?php echo __('API Key');?></a></th>
-            <th width="120"><a <?php echo $ip_sort; ?> href="apikeys.php?<?php echo $qstr; ?>&sort=ip"><?php echo __('IP Address');?></a></th>
-            <th width="100"><a  <?php echo $status_sort; ?> href="apikeys.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Status');?></a></th>
-            <th width="150" nowrap><a  <?php echo $date_sort; ?>href="apikeys.php?<?php echo $qstr; ?>&sort=date"><?php echo __('Date Added');?></a></th>
-            <th width="150" nowrap><a  <?php echo $updated_sort; ?>href="apikeys.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated');?></a></th>
+            <th width="4%">&nbsp;</th>
+            <th width="46%"><a <?php echo $key_sort; ?> href="apikeys.php?<?php echo $qstr; ?>&sort=key"><?php echo __('API Key');?></a></th>
+            <th width="12%"><a <?php echo $ip_sort; ?> href="apikeys.php?<?php echo $qstr; ?>&sort=ip"><?php echo __('IP Address');?></a></th>
+            <th width="8%"><a  <?php echo $status_sort; ?> href="apikeys.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Status');?></a></th>
+            <th width="10%" nowrap><a  <?php echo $date_sort; ?>href="apikeys.php?<?php echo $qstr; ?>&sort=date"><?php echo __('Date Added');?></a></th>
+            <th width="20%" nowrap><a  <?php echo $updated_sort; ?>href="apikeys.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated');?></a></th>
         </tr>
     </thead>
     <tbody>
@@ -92,7 +103,7 @@ else
                     $sel=true;
                 ?>
             <tr id="<?php echo $row['id']; ?>">
-                <td width=7px>
+                <td align="center">
                   <input type="checkbox" class="ckb" name="ids[]" value="<?php echo $row['id']; ?>"
                             <?php echo $sel?'checked="checked"':''; ?>> </td>
                 <td>&nbsp;<a href="apikeys.php?id=<?php echo $row['id']; ?>"><?php echo Format::htmlchars($row['apikey']); ?></a></td>
diff --git a/include/staff/banlist.inc.php b/include/staff/banlist.inc.php
index 1415b61219f8521c77d99ec0a51f2b5043b5990a..8b3a1e681f8a82007ca93f06f88377f38640b23a 100644
--- a/include/staff/banlist.inc.php
+++ b/include/staff/banlist.inc.php
@@ -48,113 +48,118 @@ $qstr.='&amp;order='.($order=='DESC'?'ASC':'DESC');
 $query="$select $from $where ORDER BY $order_by LIMIT ".$pageNav->getStart().",".$pageNav->getLimit();
 //echo $query;
 ?>
-<h2><?php echo __('Banned Email Addresses');?>
-    <i class="help-tip icon-question-sign" href="#ban_list"></i>
-    </h2>
-<div class="pull-left" style="margin-bottom:5px;">
-    <form action="banlist.php" method="GET" name="filter">
-     <input type="hidden" name="a" value="filter" >
-     <div>
-       <?php echo __('Query');?>:
-            <input name="q" type="search" size="30" autofocus
-            value="<?php echo Format::htmlchars($_REQUEST['q']); ?>">
-        <input type="submit" name="submit" value="<?php echo __('Search');?>"/>
-     </div>
-    </form>
- </div>
-<form action="banlist.php" method="POST" name="banlist">
-<div class="pull-right flush-right" style="margin-bottom:5px;">
-    <a href="banlist.php?a=add" class="red button action-button"><i class="icon-ban-circle"></i> <?php echo __('Ban New Email');?></a>
-
-     <span class="action-button" data-dropdown="#action-dropdown-more">
-       <i class="icon-caret-down pull-right"></i>
-        <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
-     </span>
-     <div id="action-dropdown-more" class="action-dropdown anchor-right">
-        <ul id="actions">
-          <li><a class="confirm" data-name="enable" href="banlist.php?a=enable">
-            <i class="icon-ok-sign icon-fixed-width"></i>
-            <?php echo __('Enable'); ?></a></li>
-          <li><a class="confirm" data-name="disable" href="banlist.php?a=disable">
-            <i class="icon-ban-circle icon-fixed-width"></i>
-            <?php echo __('Disable'); ?></a></li>
-          <li><a class="confirm" data-name="delete" href="banlist.php?a=delete">
-            <i class="icon-undo icon-fixed-width"></i>
-            <?php echo __('Remove'); ?></a></li>
-        </ul>
+<div id='basic_search'>
+    <div style="height:25px">
+        <form action="banlist.php" method="GET" name="filter">
+            <input type="hidden" name="a" value="filter" >
+            <div class="attached input">
+                <input name="q" type="search" class="basic-search" size="30" autofocus
+                       value="<?php echo Format::htmlchars($_REQUEST['q']); ?>">
+                <button type="submit" class="attached button"><i class="icon-search"></i></button>
+            </div>
+        </form>
     </div>
 </div>
 <div class="clear"></div>
-<?php
-if(($res=db_query($query)) && ($num=db_num_rows($res)))
-    $showing=$pageNav->showing();
-else
-    $showing=__('No banned emails matching the query found!');
+<form action="banlist.php" method="POST" name="banlist">
+    <div style="margin-bottom:20px; padding-top:5px;">
+        <div class="sticky bar opaque">
+            <div class="content">
+                <div class="pull-left flush-left">
+                    <h2><?php echo __('Banned Email Addresses');?>
+                        <i class="help-tip icon-question-sign" href="#ban_list"></i>
+                    </h2>
+                </div>
+                <div class="pull-right flush-right">
+                    <a href="banlist.php?a=add" class="red button action-button">
+                        <i class="icon-ban-circle"></i> <?php echo __('Ban New Email');?></a>
+                    <span class="action-button" data-dropdown="#action-dropdown-more">
+                        <i class="icon-caret-down pull-right"></i>
+                    <span ><i class="icon-cog"></i> <?php echo __('More');?></span>                        </span>
+                    <div id="action-dropdown-more" class="action-dropdown anchor-right">
+                        <ul id="actions">
+                            <li><a class="confirm" data-name="enable" href="banlist.php?a=enable">
+                                <i class="icon-ok-sign icon-fixed-width"></i>
+                                <?php echo __('Enable'); ?></a></li>
+                            <li><a class="confirm" data-name="disable" href="banlist.php?a=disable">
+                                <i class="icon-ban-circle icon-fixed-width"></i>
+                                <?php echo __('Disable'); ?></a></li>
+                            <li><a class="confirm" data-name="delete" href="banlist.php?a=delete">                                <i class="icon-undo icon-fixed-width"></i>
+                                <?php echo __('Remove'); ?></a></li>
+                        </ul>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+    <div class="clear"></div>
+    <?php
+    if(($res=db_query($query)) && ($num=db_num_rows($res)))
+        $showing=$pageNav->showing();
+    else
+        $showing=__('No banned emails matching the query found!');
 
-if($search)
-    $showing=__('Search Results').': '.$showing;
+    if($search)
+        $showing=__('Search Results').': '.$showing;
 
-?>
- <?php csrf_token(); ?>
- <input type="hidden" name="do" value="mass_process" >
-<input type="hidden" id="action" name="a" value="" >
- <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
-    <caption><?php echo $showing; ?></caption>
-    <thead>
-        <tr>
-            <th width="7px">&nbsp;</th>
-            <th width="350"><a <?php echo $email_sort; ?> href="staff.php?<?php echo $qstr; ?>&sort=email"><?php echo __('Email Address');?></a></th>
-            <th width="200"><a  <?php echo $status_sort; ?> href="staff.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Ban Status');?></a></th>
-            <th width="120"><a <?php echo $created_sort; ?> href="staff.php?<?php echo $qstr; ?>&sort=created"><?php echo __('Date Added');?></a></th>
-            <th width="120"><a <?php echo $updated_sort; ?> href="staff.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated');?></a></th>
-        </tr>
-    </thead>
-    <tbody>
+    ?>
+    <?php csrf_token(); ?>
+    <input type="hidden" name="do" value="mass_process" >
+    <input type="hidden" id="action" name="a" value="" >
+    <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
+        <thead>
+            <tr>
+                <th width="4%">&nbsp;</th>
+                <th width="56%"><a <?php echo $email_sort; ?> href="staff.php?<?php echo $qstr; ?>&sort=email"><?php echo __('Email Address');?></a></th>
+                <th width="10%"><a  <?php echo $status_sort; ?> href="staff.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Ban Status');?></a></th>
+                <th width="10%"><a <?php echo $created_sort; ?> href="staff.php?<?php echo $qstr; ?>&sort=created"><?php echo __('Date Added');?></a></th>
+                <th width="20%"><a <?php echo $updated_sort; ?> href="staff.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated');?></a></th>
+            </tr>
+        </thead>
+        <tbody>
+        <?php
+            if($res && db_num_rows($res)):
+                $ids=($errors && is_array($_POST['ids']))?$_POST['ids']:null;
+                while ($row = db_fetch_array($res)) {
+                    $sel=false;
+                    if($ids && in_array($row['id'],$ids))
+                        $sel=true;
+                    ?>
+                   <tr id="<?php echo $row['id']; ?>">
+                    <td align="center">
+                      <input type="checkbox" class="ckb" name="ids[]" value="<?php echo $row['id']; ?>" <?php echo $sel?'checked="checked"':''; ?>>
+                    </td>
+                    <td>&nbsp;<a href="banlist.php?id=<?php echo $row['id']; ?>"><?php echo Format::htmlchars($row['val']); ?></a></td>
+                    <td>&nbsp;&nbsp;<?php echo $row['isactive']?__('Active'):'<b>'.__('Disabled').'</b>'; ?></td>
+                    <td><?php echo Format::date($row['created']); ?></td>
+                    <td><?php echo Format::datetime($row['updated']); ?>&nbsp;</td>
+                   </tr>
+                <?php
+                } //end of while.
+            endif; ?>
+        <tfoot>
+         <tr>
+            <td colspan="5">
+                <?php if($res && $num){ ?>
+                <?php echo __('Select');?>:&nbsp;
+                <a id="selectAll" href="#ckb"><?php echo __('All');?></a>&nbsp;&nbsp;
+                <a id="selectNone" href="#ckb"><?php echo __('None');?></a>&nbsp;&nbsp;
+                <a id="selectToggle" href="#ckb"><?php echo __('Toggle');?></a>&nbsp;&nbsp;
+                <?php }else{
+                    echo __('No banned emails found!');
+                } ?>
+            </td>
+         </tr>
+        </tfoot>
+    </table>
     <?php
-        if($res && db_num_rows($res)):
-            $ids=($errors && is_array($_POST['ids']))?$_POST['ids']:null;
-            while ($row = db_fetch_array($res)) {
-                $sel=false;
-                if($ids && in_array($row['id'],$ids))
-                    $sel=true;
-                ?>
-               <tr id="<?php echo $row['id']; ?>">
-                <td width=7px>
-                  <input type="checkbox" class="ckb" name="ids[]" value="<?php echo $row['id']; ?>" <?php echo $sel?'checked="checked"':''; ?>>
-                </td>
-                <td>&nbsp;<a href="banlist.php?id=<?php echo $row['id']; ?>"><?php echo Format::htmlchars($row['val']); ?></a></td>
-                <td>&nbsp;&nbsp;<?php echo $row['isactive']?__('Active'):'<b>'.__('Disabled').'</b>'; ?></td>
-                <td><?php echo Format::date($row['created']); ?></td>
-                <td><?php echo Format::datetime($row['updated']); ?>&nbsp;</td>
-               </tr>
-            <?php
-            } //end of while.
-        endif; ?>
-    <tfoot>
-     <tr>
-        <td colspan="5">
-            <?php if($res && $num){ ?>
-            <?php echo __('Select');?>:&nbsp;
-            <a id="selectAll" href="#ckb"><?php echo __('All');?></a>&nbsp;&nbsp;
-            <a id="selectNone" href="#ckb"><?php echo __('None');?></a>&nbsp;&nbsp;
-            <a id="selectToggle" href="#ckb"><?php echo __('Toggle');?></a>&nbsp;&nbsp;
-            <?php }else{
-                echo __('No banned emails found!');
-            } ?>
-        </td>
-     </tr>
-    </tfoot>
-</table>
-<?php
-if($res && $num): //Show options..
-    echo '<div>&nbsp;'.__('Page').':'.$pageNav->getPageLinks().'&nbsp;</div>';
-?>
-
-<?php
-endif;
-?>
+    if($res && $num): //Show options..
+        echo '<div>&nbsp;'.__('Page').':'.$pageNav->getPageLinks().'&nbsp;</div>';
+    ?>
+    <?php
+        endif;
+    ?>
 </form>
-
 <div style="display:none;" class="dialog" id="confirm-action">
     <h3><?php echo __('Please Confirm');?></h3>
     <a class="close" href=""><i class="icon-remove-circle"></i></a>
diff --git a/include/staff/banrule.inc.php b/include/staff/banrule.inc.php
index 4f98cd148511d0787873a81f07b75e5ddc6c8275..1e433ee89ade186369e1dafe14a1d7a315ccf365 100644
--- a/include/staff/banrule.inc.php
+++ b/include/staff/banrule.inc.php
@@ -24,14 +24,14 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
  <input type="hidden" name="id" value="<?php echo $info['id']; ?>">
- <h2><?php echo __('Manage Email Ban Rule');?>
+
+    <h2><?php echo $title; ?>
     <i class="help-tip icon-question-sign" href="#ban_list"></i>
     </h2>
  <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
     <thead>
         <tr>
             <th colspan="2">
-                <h4><?php echo $title; ?></h4>
                 <em><?php echo __('Valid email address required');?></em>
             </th>
         </tr>
diff --git a/include/staff/cannedresponse.inc.php b/include/staff/cannedresponse.inc.php
index 930052225625746cc9b088d608e11407f85ee2f0..0dabac6fd3319fd5dca169521e47da16f7693bb6 100644
--- a/include/staff/cannedresponse.inc.php
+++ b/include/staff/cannedresponse.inc.php
@@ -26,14 +26,16 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
  <input type="hidden" name="id" value="<?php echo $info['id']; ?>">
- <h2><?php echo __('Canned Response')?>
- &nbsp;<i class="help-tip icon-question-sign" href="#canned_response"></i></h2>
+ <h2><?php echo $title; ?>
+         <?php if (isset($info['title'])) { ?><small>
+    — <?php echo $info['title']; ?></small>
+     <?php } ?><i class="help-tip icon-question-sign" href="#canned_response"></i>
+</h2>
  <table class="form_table fixed" width="940" border="0" cellspacing="0" cellpadding="2">
     <thead>
         <tr><td></td><td></td></tr> <!-- For fixed table layout -->
         <tr>
             <th colspan="2">
-                <h4><?php echo $title; ?></h4>
                 <em><?php echo __('Canned response settings');?></em>
             </th>
         </tr>
@@ -118,7 +120,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
     <div id="msg_warning"><?php echo __('Canned response is in use by email filter(s)');?>: <?php
     echo implode(', ', $canned->getFilters()); ?></div>
  <?php } ?>
-<p style="padding-left:225px;">
+<p style="text-align:center;">
     <input type="submit" name="submit" value="<?php echo $submit_text; ?>">
     <input type="reset"  name="reset"  value="<?php echo __('Reset'); ?>" onclick="javascript:
         $(this.form).find('textarea.richtext')
diff --git a/include/staff/cannedresponses.inc.php b/include/staff/cannedresponses.inc.php
index bca9ee17c5e0347db832d50b532f628e839286d6..1a55d08db8f164a9890fe49f08b181259bfef754 100644
--- a/include/staff/cannedresponses.inc.php
+++ b/include/staff/cannedresponses.inc.php
@@ -50,25 +50,57 @@ else
     $showing=__('No premade responses found!');
 
 ?>
-<div class="pull-left" style="width:700px;padding-top:5px;">
- <h2><?php echo __('Canned Responses');?></h2>
- </div>
-<div class="pull-right flush-right" style="padding-top:5px;padding-right:5px;">
-    <b><a href="canned.php?a=add" class="Icon newReply"><?php echo __('Add New Response');?></a></b></div>
-<div class="clear"></div>
 <form action="canned.php" method="POST" name="canned">
+
+<div class="sticky bar opaque">
+    <div class="content">
+        <div class="pull-left flush-left">
+            <h2><?php echo __('Canned Responses');?></h2>
+        </div>
+        <div class="pull-right flush-right">
+            <a href="canned.php?a=add" class="green button"><i class="icon-plus-sign"></i> <?php echo __('Add New Response');?></a>
+
+            <span class="action-button" data-dropdown="#action-dropdown-more" style="/*DELME*/ vertical-align:top; margin-bottom:0">
+                    <i class="icon-caret-down pull-right"></i>
+                    <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
+            </span>
+            <div id="action-dropdown-more" class="action-dropdown anchor-right">
+                <ul id="actions">
+                    <li>
+                        <a class="confirm" data-name="enable" href="canned.php?a=enable">
+                            <i class="icon-ok-sign icon-fixed-width"></i>
+                            <?php echo __( 'Enable'); ?>
+                        </a>
+                    </li>
+                    <li>
+                        <a class="confirm" data-name="disable" href="canned.php?a=disable">
+                            <i class="icon-ban-circle icon-fixed-width"></i>
+                            <?php echo __( 'Disable'); ?>
+                        </a>
+                    </li>
+                    <li class="danger">
+                        <a class="confirm" data-name="delete" href="canned.php?a=delete">
+                            <i class="icon-trash icon-fixed-width"></i>
+                            <?php echo __( 'Delete'); ?>
+                        </a>
+                    </li>
+                </ul>
+            </div>
+        </div>
+    </div>
+</div>
+<div class="clear"></div>
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="mass_process" >
  <input type="hidden" id="action" name="a" value="" >
  <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
-    <caption><?php echo $showing; ?></caption>
     <thead>
         <tr>
-            <th width="7">&nbsp;</th>
-            <th width="500"><a <?php echo $title_sort; ?> href="canned.php?<?php echo $qstr; ?>&sort=title"><?php echo __('Title');?></a></th>
-            <th width="80"><a  <?php echo $status_sort; ?> href="canned.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Status');?></a></th>
-            <th width="200"><a  <?php echo $dept_sort; ?> href="canned.php?<?php echo $qstr; ?>&sort=dept"><?php echo __('Department');?></a></th>
-            <th width="150" nowrap><a  <?php echo $updated_sort; ?>href="canned.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated');?></a></th>
+            <th width="4%">&nbsp;</th>
+            <th width="46%"><a <?php echo $title_sort; ?> href="canned.php?<?php echo $qstr; ?>&sort=title"><?php echo __('Title');?></a></th>
+            <th width="10%"><a  <?php echo $status_sort; ?> href="canned.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Status');?></a></th>
+            <th width="20%"><a  <?php echo $dept_sort; ?> href="canned.php?<?php echo $qstr; ?>&sort=dept"><?php echo __('Department');?></a></th>
+            <th width="20%" nowrap><a  <?php echo $updated_sort; ?>href="canned.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated');?></a></th>
         </tr>
     </thead>
     <tbody>
@@ -83,7 +115,7 @@ else
                 $files=$row['files']?'<span class="Icon file">&nbsp;</span>':'';
                 ?>
             <tr id="<?php echo $row['canned_id']; ?>">
-                <td width=7px>
+                <td align="center">
                   <input type="checkbox" name="ids[]" value="<?php echo $row['canned_id']; ?>" class="ckb"
                             <?php echo $sel?'checked="checked"':''; ?> />
                 </td>
@@ -116,11 +148,7 @@ else
 if($res && $num): //Show options..
     echo '<div>&nbsp;'.__('Page').':'.$pageNav->getPageLinks().'&nbsp;</div>';
 ?>
-<p class="centered" id="actions">
-    <input class="button" type="submit" name="enable" value="<?php echo __('Enable');?>" >
-    <input class="button" type="submit" name="disable" value="<?php echo __('Disable');?>" >
-    <input class="button" type="submit" name="delete" value="<?php echo __('Delete');?>" >
-</p>
+
 <?php
 endif;
 ?>
diff --git a/include/staff/categories.inc.php b/include/staff/categories.inc.php
index 509228e0a98ef88e0bdd9c8aa7353b8eca2cb2ad..222079b5274daceb7775467b7a53457775f438e6 100644
--- a/include/staff/categories.inc.php
+++ b/include/staff/categories.inc.php
@@ -36,43 +36,50 @@ else
     $showing=__('No FAQ categories found!');
 
 ?>
-<div class="pull-right flush-right">
-    <a href="categories.php?a=add" class="green button">
-       <i class="icon-plus-sign"></i> <?php echo __('Add New Category');?>
-    </a>
 
-    <span class="action-button" data-dropdown="#action-dropdown-more">
-        <i class="icon-caret-down pull-right"></i>
-        <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
-    </span>
-    <div id="action-dropdown-more" class="action-dropdown anchor-right">
-        <ul id="actions">
-            <li class="danger"><a class="confirm" data-form-id="mass-actions" data-name="delete" href="categories.php?a=delete">
-                <i class="icon-trash icon-fixed-width"></i>
-                <?php echo __('Delete'); ?></a></li>
-        </ul>
-    </div>
-</div>
-
-<div class="pull-left">
- <h2><?php echo __('FAQ Categories');?></h2>
-</div>
-
-
-<div class="clear"></div>
 <form action="categories.php" method="POST" id="mass-actions">
- <?php csrf_token(); ?>
- <input type="hidden" name="do" value="mass_process" >
- <input type="hidden" id="action" name="a" value="" >
+    <div class="sticky bar opaque">
+        <div class="content">
+            <div class="pull-left flush-left">
+                <h2><?php echo __('FAQ Categories');?></h2>
+            </div>
+            <div class="pull-right flush-right">
+                <a href="categories.php?a=add" class="green button">
+                    <i class="icon-plus-sign"></i>
+                    <?php echo __( 'Add New Category');?>
+                </a>
+                <div class="pull-right flush-right">
+
+                    <span class="action-button" data-dropdown="#action-dropdown-more">
+                        <i class="icon-caret-down pull-right"></i>
+                        <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
+                    </span>
+                    <div id="action-dropdown-more" class="action-dropdown anchor-right">
+                        <ul id="actions">
+                            <li class="danger">
+                                <a class="confirm" data-form-id="mass-actions" data-name="delete" href="categories.php?a=delete">
+                                    <i class="icon-trash icon-fixed-width"></i>
+                                    <?php echo __( 'Delete'); ?>
+                                </a>
+                            </li>
+                        </ul>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+    <div class="clear"></div>
+    <?php csrf_token(); ?>
+    <input type="hidden" name="do" value="mass_process" >
+    <input type="hidden" id="action" name="a" value="" >
  <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
-    <caption><?php echo $showing; ?></caption>
     <thead>
         <tr>
-            <th width="7">&nbsp;</th>
-            <th width="500"><a <?php echo $name_sort; ?> href="categories.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name');?></a></th>
-            <th width="150"><a  <?php echo $type_sort; ?> href="categories.php?<?php echo $qstr; ?>&sort=type"><?php echo __('Type');?></a></th>
-            <th width="80"><a  <?php echo $faqs_sort; ?> href="categories.php?<?php echo $qstr; ?>&sort=faqs"><?php echo __('FAQs');?></a></th>
-            <th width="150" nowrap><a  <?php echo $updated_sort; ?>href="categories.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated');?></a></th>
+            <th width="4%">&nbsp;</th>
+            <th width="56%"><a <?php echo $name_sort; ?> href="categories.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name');?></a></th>
+            <th width="10%"><a  <?php echo $type_sort; ?> href="categories.php?<?php echo $qstr; ?>&sort=type"><?php echo __('Type');?></a></th>
+            <th width="10%"><a  <?php echo $faqs_sort; ?> href="categories.php?<?php echo $qstr; ?>&sort=faqs"><?php echo __('FAQs');?></a></th>
+            <th width="20%" nowrap><a  <?php echo $updated_sort; ?>href="categories.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated');?></a></th>
         </tr>
     </thead>
     <tbody>
@@ -89,7 +96,7 @@ else
                 $faqs=sprintf('<a href="faq.php?cid=%d">%d</a>',$C->getId(),$C->faq_count);
             ?>
             <tr id="<?php echo $C->getId(); ?>">
-                <td width=7px>
+                <td align="center">
                   <input type="checkbox" name="ids[]" value="<?php echo $C->getId(); ?>" class="ckb"
                             <?php echo $sel?'checked="checked"':''; ?>>
                 </td>
diff --git a/include/staff/category.inc.php b/include/staff/category.inc.php
index c1b4dcda8f8534268408a8a04958bbb21b1e4a6d..5db7361544640f300a17ce61740037a075deb4a1 100644
--- a/include/staff/category.inc.php
+++ b/include/staff/category.inc.php
@@ -6,7 +6,7 @@ if (!defined('OSTSCPINC') || !$thisstaff
 $info=array();
 $qs = array();
 if($category && $_REQUEST['a']!='add'){
-    $title=__('Update Category').': '.$category->getName();
+    $title=__('Update Category');
     $action='update';
     $submit_text=__('Save Changes');
     $info=$category->getHashtable();
@@ -41,10 +41,12 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
  <input type="hidden" name="id" value="<?php echo $info['id']; ?>">
- <h2><?php echo __('FAQ Category');?></h2>
- <div class="faq-title" style="margin:5px 0 15px">
-    <?php echo $title; ?>
- </div>
+ <h2><?php echo $title; ?>
+     <?php if (isset($info['name'])) { ?><small>
+    — <?php echo $info['name']; ?></small>
+     <?php } ?>
+    </h2>
+
 
     <div style="margin:8px 0"><strong><?php echo __('Category Type');?>:</strong>
         <span class="error">*</span></div>
@@ -135,7 +137,7 @@ if (count($langs) > 1) { ?>
 
 <div class="tab_content" id="notes" style="display:none;">
     <b><?php echo __('Internal Notes');?></b>:
-    <div class="faded"><?php echo __("Be liberal, they're internal");?></div>
+    <span class="faded"><?php echo __("Be liberal, they're internal");?></span>
     <textarea class="richtext no-bar" name="notes" cols="21"
         rows="8" style="width: 80%;"><?php echo $info['notes']; ?></textarea>
 </div>
diff --git a/include/staff/dashboard.inc.php b/include/staff/dashboard.inc.php
new file mode 100644
index 0000000000000000000000000000000000000000..d75ee3ef97621897d87f86439b1b82c465764de3
--- /dev/null
+++ b/include/staff/dashboard.inc.php
@@ -0,0 +1,122 @@
+<?php
+$report = new OverviewReport($_POST['start'], $_POST['period']);
+$plots = $report->getPlotData();
+
+?>
+<script type="text/javascript" src="js/raphael-min.js"></script>
+<script type="text/javascript" src="js/g.raphael.js"></script>
+<script type="text/javascript" src="js/g.line-min.js"></script>
+<script type="text/javascript" src="js/g.dot-min.js"></script>
+<script type="text/javascript" src="js/dashboard.inc.js"></script>
+
+<link rel="stylesheet" type="text/css" href="css/dashboard.css"/>
+
+<form method="post" action="dashboard.php">
+<div id="basic_search">
+    <div style="min-height:25px;">
+        <!--<p><?php //echo __('Select the starting time and period for the system activity graph');?></p>-->
+            <?php echo csrf_token(); ?>
+            <label>
+                <?php echo __( 'Report timeframe'); ?>:
+                <input type="text" class="dp input-medium search-query" name="start" placeholder="<?php echo __('Last month');?>"i
+                    value="<?php echo Format::htmlchars($_POST['start']); ?>" />
+            </label>
+            <label>
+                <?php echo __( 'period');?>:
+                <select name="period">
+                    <option value="now" selected="selected">
+                        <?php echo __( 'Up to today');?>
+                    </option>
+                    <option value="+7 days">
+                        <?php echo __( 'One Week');?>
+                    </option>
+                    <option value="+14 days">
+                        <?php echo __( 'Two Weeks');?>
+                    </option>
+                    <option value="+1 month">
+                        <?php echo __( 'One Month');?>
+                    </option>
+                    <option value="+3 months">
+                        <?php echo __( 'One Quarter');?>
+                    </option>
+                </select>
+            </label>
+            <button class="green button action-button muted" type="submit">
+                <?php echo __( 'Refresh');?>
+            </button>
+            <i class="help-tip icon-question-sign" href="#report_timeframe"></i>
+    </div>
+</div>
+<div class="clear"></div>
+<div style="margin-bottom:20px; padding-top:5px;">
+    <div class="pull-left flush-left">
+        <h2><?php echo __('Ticket Activity');
+            ?>&nbsp;<i class="help-tip icon-question-sign" href="#ticket_activity"></i></h2>
+    </div>
+</div>
+<div class="clear"></div>
+<!-- Create a graph and fetch some data to create pretty dashboard -->
+<div style="position:relative">
+    <div id="line-chart-here" style="height:300px"></div>
+    <div style="position:absolute;right:0;top:0" id="line-chart-legend"></div>
+</div>
+
+<hr/>
+<h2><?php echo __('Statistics'); ?>&nbsp;<i class="help-tip icon-question-sign" href="#statistics"></i></h2>
+<p><?php echo __('Statistics of tickets organized by department, help topic, and agent.');?></p>
+
+<ul class="clean tabs">
+<?php
+$first = true;
+$groups = $report->enumTabularGroups();
+foreach ($groups as $g=>$desc) { ?>
+    <li class="<?php echo $first ? 'active' : ''; ?>"><a href="#<?php echo Format::slugify($g); ?>"
+        ><?php echo Format::htmlchars($desc); ?></a></li>
+<?php
+    $first = false;
+} ?>
+</ul>
+
+<?php
+$first = true;
+foreach ($groups as $g=>$desc) {
+    $data = $report->getTabularData($g); ?>
+    <div class="tab_content <?php echo (!$first) ? 'hidden' : ''; ?>" id="<?php echo Format::slugify($g); ?>">
+    <table class="dashboard-stats table"><tbody><tr>
+<?php
+    foreach ($data['columns'] as $j=>$c) { ?>
+        <th <?php if ($j === 0) echo 'width="30%" class="flush-left"'; ?>><?php echo Format::htmlchars($c); ?></th>
+<?php
+    } ?>
+    </tr></tbody>
+    <tbody>
+<?php
+    foreach ($data['data'] as $i=>$row) {
+        echo '<tr>';
+        foreach ($row as $j=>$td) {
+            if ($j === 0) { ?>
+                <th class="flush-left"><?php echo Format::htmlchars($td); ?></th>
+<?php       }
+            else { ?>
+                <td><?php echo Format::htmlchars($td);
+                if ($td) { // TODO Add head map
+                }
+                echo '</td>';
+            }
+        }
+        echo '</tr>';
+    }
+    $first = false; ?>
+    </tbody></table>
+    <div style="margin-top: 5px"><button type="submit" class="link button" name="export"
+        value="<?php echo Format::htmlchars($g); ?>">
+        <i class="icon-download"></i>
+        <?php echo __('Export'); ?></a></div>
+    </div>
+<?php
+}
+?>
+</form>
+<script>
+    $.drawPlots(<?php echo JsonDataEncoder::encode($report->getPlotData()); ?>);
+</script>
diff --git a/include/staff/department.inc.php b/include/staff/department.inc.php
index 62882a14ce1cdcdec9bdba876dd7605ead7657fa..7b6efb32ef9a64b1b0822fd9e34354de5bbb3b31 100644
--- a/include/staff/department.inc.php
+++ b/include/staff/department.inc.php
@@ -31,7 +31,11 @@ $info = Format::htmlchars(($errors && $_POST) ? $_POST : $info);
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
  <input type="hidden" name="id" value="<?php echo $info['id']; ?>">
- <h2><?php echo __('Department');?></h2>
+<h2><?php echo $title; ?>
+    <?php if (isset($info['name'])) { ?><small>
+    — <?php echo $info['name']; ?></small>
+    <?php } ?>
+</h2>
 <ul class="clean tabs">
     <li class="active"><a href="#settings">
         <i class="icon-file"></i> <?php echo __('Settings'); ?></a></li>
@@ -43,7 +47,6 @@ $info = Format::htmlchars(($errors && $_POST) ? $_POST : $info);
     <thead>
         <tr>
             <th colspan="2">
-                <h4><?php echo $title; ?></h4>
                 <em><?php echo __('Department Information');?></em>
             </th>
         </tr>
diff --git a/include/staff/departments.inc.php b/include/staff/departments.inc.php
index 6e3076fc9564eaa7e71e8206dd10f39804872a61..2924eea68f11acb94209187472eef9b1892c03e6 100644
--- a/include/staff/departments.inc.php
+++ b/include/staff/departments.inc.php
@@ -66,15 +66,14 @@ $showing = $pageNav->showing().' '._N('department', 'departments', $count);
  <input type="hidden" name="do" value="mass_process" >
  <input type="hidden" id="action" name="a" value="" >
  <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
-    <caption><?php echo $showing; ?></caption>
     <thead>
         <tr>
-            <th width="7px">&nbsp;</th>
-            <th width="200"><a <?php echo $name_sort; ?> href="departments.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name');?></a></th>
-            <th width="80"><a  <?php echo $type_sort; ?> href="departments.php?<?php echo $qstr; ?>&sort=type"><?php echo __('Type');?></a></th>
-            <th width="70"><a  <?php echo $users_sort; ?>href="departments.php?<?php echo $qstr; ?>&sort=users"><?php echo __('Agents');?></a></th>
-            <th width="300"><a  <?php echo $email_sort; ?> href="departments.php?<?php echo $qstr; ?>&sort=email"><?php echo __('Email Address');?></a></th>
-            <th width="180"><a  <?php echo $manager_sort; ?> href="departments.php?<?php echo $qstr; ?>&sort=manager"><?php echo __('Manager');?></a></th>
+            <th width="4%">&nbsp;</th>
+            <th width="28%"><a <?php echo $name_sort; ?> href="departments.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name');?></a></th>
+            <th width="8%"><a  <?php echo $type_sort; ?> href="departments.php?<?php echo $qstr; ?>&sort=type"><?php echo __('Type');?></a></th>
+            <th width="8%"><a  <?php echo $users_sort; ?>href="departments.php?<?php echo $qstr; ?>&sort=users"><?php echo __('Agents');?></a></th>
+            <th width="30%"><a  <?php echo $email_sort; ?> href="departments.php?<?php echo $qstr; ?>&sort=email"><?php echo __('Email Address');?></a></th>
+            <th width="22%"><a  <?php echo $manager_sort; ?> href="departments.php?<?php echo $qstr; ?>&sort=manager"><?php echo __('Manager');?></a></th>
         </tr>
     </thead>
     <tbody>
@@ -110,7 +109,7 @@ $showing = $pageNav->showing().' '._N('department', 'departments', $count);
                 $default= ($defaultId == $dept->getId()) ?' <small>'.__('(Default)').'</small>' : '';
                 ?>
             <tr id="<?php echo $id; ?>">
-                <td width=7px>
+                <td align="center">
                   <input type="checkbox" class="ckb" name="ids[]"
                   value="<?php echo $id; ?>"
                   <?php echo $sel? 'checked="checked"' : ''; ?>
diff --git a/include/staff/directory.inc.php b/include/staff/directory.inc.php
index 361c90121761db6b072f3b1e7f7fe4c64077dece..9eb4926dd6825ace920ad39536e8521ae422102f 100644
--- a/include/staff/directory.inc.php
+++ b/include/staff/directory.inc.php
@@ -74,9 +74,9 @@ $pageNav->paginate($agents);
 $qstr.='&amp;order='.($order=='DESC' ? 'ASC' : 'DESC');
 
 ?>
-<h2><?php echo __('Agents');?>
-&nbsp;<i class="help-tip icon-question-sign" href="#staff_members"></i></h2>
-<div class="pull-left" style="width:700px">
+
+<div id="basic_search">
+    <div style="min-height:25px;">
     <form action="directory.php" method="GET" name="filter">
        <input type="text" name="q" value="<?php echo Format::htmlchars($_REQUEST['q']); ?>" >
         <select name="did" id="did">
@@ -93,23 +93,30 @@ $qstr.='&amp;order='.($order=='DESC' ? 'ASC' : 'DESC');
         &nbsp;<i class="help-tip icon-question-sign" href="#apply_filtering_criteria"></i>
     </form>
  </div>
+</div>
 <div class="clear"></div>
-<?php
-if ($agents->exists(true))
-    $showing=$pageNav->showing();
-else
-    $showing=__('No agents found!');
-?>
+<div style="margin-bottom:20px; padding-top:5px;">
+    <div class="pull-left flush-left">
+        <h2><?php echo __('Agents');?>
+            &nbsp;<i class="help-tip icon-question-sign" href="#staff_members"></i>
+        </h2>
+    </div>
+</div>
+    <?php
+    if ($agents->exists(true))
+        $showing=$pageNav->showing();
+    else
+        $showing=__('No agents found!');
+    ?>
 <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
-    <caption><?php echo $showing; ?></caption>
     <thead>
         <tr>
-            <th width="160"><a <?php echo $name_sort; ?> href="directory.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name');?></a></th>
-            <th width="150"><a  <?php echo $dept_sort; ?>href="directory.php?<?php echo $qstr; ?>&sort=dept"><?php echo __('Department');?></a></th>
-            <th width="180"><a  <?php echo $email_sort; ?>href="directory.php?<?php echo $qstr; ?>&sort=email"><?php echo __('Email Address');?></a></th>
-            <th width="120"><a <?php echo $phone_sort; ?> href="directory.php?<?php echo $qstr; ?>&sort=phone"><?php echo __('Phone Number');?></a></th>
-            <th width="80"><a <?php echo $ext_sort; ?> href="directory.php?<?php echo $qstr; ?>&sort=ext"><?php echo __(/* As in a phone number `extension` */ 'Extension');?></a></th>
-            <th width="120"><a <?php echo $mobile_sort; ?> href="directory.php?<?php echo $qstr; ?>&sort=mobile"><?php echo __('Mobile Number');?></a></th>
+            <th width="20%"><a <?php echo $name_sort; ?> href="directory.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name');?></a></th>
+            <th width="15%"><a  <?php echo $dept_sort; ?>href="directory.php?<?php echo $qstr; ?>&sort=dept"><?php echo __('Department');?></a></th>
+            <th width="25%"><a  <?php echo $email_sort; ?>href="directory.php?<?php echo $qstr; ?>&sort=email"><?php echo __('Email Address');?></a></th>
+            <th width="15%"><a <?php echo $phone_sort; ?> href="directory.php?<?php echo $qstr; ?>&sort=phone"><?php echo __('Phone Number');?></a></th>
+            <th width="10%"><a <?php echo $ext_sort; ?> href="directory.php?<?php echo $qstr; ?>&sort=ext"><?php echo __(/* As in a phone number `extension` */ 'Extension');?></a></th>
+            <th width="15%"><a <?php echo $mobile_sort; ?> href="directory.php?<?php echo $qstr; ?>&sort=mobile"><?php echo __('Mobile Number');?></a></th>
         </tr>
     </thead>
     <tbody>
diff --git a/include/staff/dynamic-form.inc.php b/include/staff/dynamic-form.inc.php
index ed2ec1e4cf53b9281ec75c12883c6f1ae5bf8a00..831f7c7b10e82cb3725fb10019cb8139419be79f 100644
--- a/include/staff/dynamic-form.inc.php
+++ b/include/staff/dynamic-form.inc.php
@@ -36,12 +36,16 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
     <input type="hidden" name="do" value="<?php echo $action; ?>">
     <input type="hidden" name="a" value="<?php echo $action; ?>">
     <input type="hidden" name="id" value="<?php echo $info['id']; ?>">
-    <h2><?php echo $form ? Format::htmlchars($form->getTitle()) : __('Custom Form'); ?></h2>
+
+    <h2><?php echo $title; ?>
+    <?php if (isset($info['title'])) { ?><small>
+    — <?php echo $info['title']; ?></small>
+        <?php } ?>
+    </h2>
     <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
     <thead>
         <tr>
             <th colspan="2">
-                <h4><?php echo $title; ?></h4>
                 <em><?php echo __(
                 'Forms are used to allow for collection of custom data'
                 ); ?></em>
@@ -157,7 +161,7 @@ if ($form && count($langs) > 1) { ?>
             </th>
         </tr>
         <tr>
-            <th nowrap
+            <th nowrap width="4%"
                 ><i class="help-tip icon-question-sign" href="#field_sort"></i></th>
             <th nowrap><?php echo __('Label'); ?>
                 <i class="help-tip icon-question-sign" href="#field_label"></i></th>
@@ -179,12 +183,13 @@ if ($form && count($langs) > 1) { ?>
         $fi = $f->getImpl();
         $ferrors = $f->errors(); ?>
         <tr>
-            <td><i class="icon-sort"></i></td>
+            <td align="center"><i class="icon-sort"></i></td>
             <td><input type="text" size="32" name="label-<?php echo $id; ?>"
                 data-translate-tag="<?php echo $f->getTranslateTag('label'); ?>"
                 value="<?php echo Format::htmlchars($f->get('label')); ?>"/>
                 <font class="error"><?php
                     if ($ferrors['label']) echo '<br/>'; echo $ferrors['label']; ?>
+                </font>
             </td>
             <td nowrap><select style="max-width:150px" name="type-<?php echo $id; ?>" <?php
                 if (!$fi->isChangeable()) echo 'disabled="disabled"'; ?>>
@@ -220,18 +225,20 @@ if ($form && count($langs) > 1) { ?>
                     if ($ferrors['name']) echo '<br/>'; echo $ferrors['name'];
                 ?></font>
                 </td>
-            <td><input class="delete-box" type="checkbox" name="delete-<?php echo $id; ?>"
+            <td align="center">
+                <input class="delete-box" type="checkbox" name="delete-<?php echo $id; ?>"
                     data-field-label="<?php echo $f->get('label'); ?>"
                     data-field-id="<?php echo $id; ?>"
                     <?php echo $deletable; ?>/>
                 <input type="hidden" name="sort-<?php echo $id; ?>"
                     value="<?php echo $f->get('sort'); ?>"/>
-                </td>
+            </td>
         </tr>
+    <tr>
     <?php
     }
     for ($i=0; $i<$newcount; $i++) { ?>
-            <td><em>+</em>
+            <td align="center"><em>+</em>
                 <input type="hidden" name="sort-new-<?php echo $i; ?>"
                     value="<?php echo $info["sort-new-$i"]; ?>"/></td>
             <td><input type="text" size="32" name="label-new-<?php echo $i; ?>"
@@ -248,9 +255,10 @@ if ($form && count($langs) > 1) { ?>
                     <?php } ?>
                 </optgroup>
                 <?php } ?>
-            </select></td>
-            <td>
-                <select name="visibility-new-<?php echo $i; ?>">
+            </select>
+        </td>
+        <td>
+            <select name="visibility-new-<?php echo $i; ?>">
 <?php
     $rmode = $info['visibility-new-'.$i];
     foreach (DynamicFormField::allRequirementModes() as $m=>$I) { ?>
@@ -258,12 +266,15 @@ if ($form && count($langs) > 1) { ?>
          echo 'selected="selected"'; ?>><?php echo $I['desc']; ?></option>
 <?php } ?>
                 <select>
-            <td><input type="text" size="20" name="name-new-<?php echo $i; ?>"
-                value="<?php echo $info["name-new-$i"]; ?>"/>
-                <font class="error"><?php
-                    if ($errors["new-$i"]['name']) echo '<br/>'; echo $errors["new-$i"]['name'];
-                ?></font>
-            <td></td>
+                    <td><input type="text" size="20" name="name-new-<?php echo $i; ?>"
+                        value="<?php echo $info["name-new-$i"]; ?>"/>
+                        <font class="error"><?php
+                            if ($errors["new-$i"]['name']) echo '<br/>'; echo $errors["new-$i"]['name'];
+                            ?>
+                        </font>
+                    </td>
+                </select>
+            </select>
         </tr>
     <?php } ?>
     </tbody>
diff --git a/include/staff/dynamic-forms.inc.php b/include/staff/dynamic-forms.inc.php
index 65bcc43c64016b0115069493f9753f740a08656f..7dafb2c6b4c959aee7bb70ae7fc5ca988eda8a3f 100644
--- a/include/staff/dynamic-forms.inc.php
+++ b/include/staff/dynamic-forms.inc.php
@@ -1,24 +1,29 @@
 <form action="forms.php" method="POST" name="forms">
 
-<div class="pull-left" style="padding-top:5px;">
- <h2><?php echo __('Custom Forms'); ?></h2>
-</div>
-<div class="pull-right flush-right" style="padding-top:5px;padding-right:5px;">
-<a href="forms.php?a=add" class="green button action-button"><i class="icon-plus-sign"></i> <?php
-    echo __('Add New Custom Form'); ?></a>
-
-    <span class="action-button" data-dropdown="#action-dropdown-more">
-       <i class="icon-caret-down pull-right"></i>
-        <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
-    </span>
-     <div id="action-dropdown-more" class="action-dropdown anchor-right">
-        <ul id="actions">
-          <li class="danger"><a class="confirm" data-name="delete" href="forms.php?a=delete">
-            <i class="icon-trash icon-fixed-width"></i>
-            <?php echo __('Delete'); ?></a></li>
-        </ul>
+<div class="sticky bar opaque">
+    <div class="content">
+        <div class="pull-left flush-left">
+            <h2><?php echo __('Custom Forms'); ?></h2>
+        </div>
+        <div class="pull-right flush-right">
+            <a href="forms.php?a=add" class="green button action-button"><i class="icon-plus-sign"></i> <?php
+                    echo __('Add New Custom Form'); ?></a>
+            <span class="action-button" data-dropdown="#action-dropdown-more">
+                    <i class="icon-caret-down pull-right"></i>
+                    <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
+            </span>
+            <div id="action-dropdown-more" class="action-dropdown anchor-right">
+                <ul id="actions">
+                    <li class="danger">
+                        <a class="confirm" data-name="delete" href="forms.php?a=delete">
+                            <i class="icon-trash icon-fixed-width"></i>
+                            <?php echo __( 'Delete'); ?>
+                        </a>
+                    </li>
+                </ul>
+            </div>
+        </div>
     </div>
-
 </div>
 <div class="clear"></div>
 
@@ -40,8 +45,8 @@ $showing=$pageNav->showing().' '._N('form','forms',$count);
 <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
     <thead>
         <tr>
-            <th width="7">&nbsp;</th>
-            <th><?php echo __('Built-in Forms'); ?></th>
+            <th width="4%">&nbsp;</th>
+            <th width="50%"><?php echo __('Built-in Forms'); ?></th>
             <th><?php echo __('Last Updated'); ?></th>
         </tr>
     </thead>
@@ -58,7 +63,7 @@ $showing=$pageNav->showing().' '._N('form','forms',$count);
             ->filter(array('type__in'=>array_keys($forms)))
             ->order_by('type', 'title') as $form) { ?>
         <tr>
-        <td><i class="<?php echo $forms[$form->get('type')]; ?>"></i></td>
+        <td align="center"><i class="<?php echo $forms[$form->get('type')]; ?>"></i></td>
             <td><a href="?id=<?php echo $form->get('id'); ?>">
                 <?php echo $form->get('title'); ?></a>
             <td><?php echo $form->get('updated'); ?></td>
@@ -66,10 +71,9 @@ $showing=$pageNav->showing().' '._N('form','forms',$count);
     <?php } ?>
     </tbody>
     <tbody>
-    <caption><?php echo $showing; ?></caption>
     <thead>
         <tr>
-            <th width="7">&nbsp;</th>
+            <th width="4%">&nbsp;</th>
             <th><?php echo __('Custom Forms'); ?></th>
             <th><?php echo __('Last Updated'); ?></th>
         </tr>
@@ -82,7 +86,7 @@ $showing=$pageNav->showing().' '._N('form','forms',$count);
             if($ids && in_array($form->get('id'),$ids))
                 $sel=true; ?>
         <tr>
-            <td><?php if ($form->isDeletable()) { ?>
+            <td align="center"><?php if ($form->isDeletable()) { ?>
                 <input type="checkbox" class="ckb" name="ids[]" value="<?php echo $form->get('id'); ?>"
                     <?php echo $sel?'checked="checked"':''; ?>>
             <?php } ?></td>
diff --git a/include/staff/dynamic-list.inc.php b/include/staff/dynamic-list.inc.php
index cfc87a59dbf3e361c7fcea610989c04a71ab94b0..4e4b0b7766040afefae49cbd7b47708566c9cf28 100644
--- a/include/staff/dynamic-list.inc.php
+++ b/include/staff/dynamic-list.inc.php
@@ -24,9 +24,11 @@ $info=Format::htmlchars(($errors && $_POST) ? array_merge($info,$_POST) : $info)
     <input type="hidden" name="do" value="<?php echo $action; ?>">
     <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
     <input type="hidden" name="id" value="<?php echo $info['id']; ?>">
-    <h2><?php echo __('Custom List'); ?>
-    <?php echo $list ? $list->getName() : __('Add new list'); ?></h2>
-
+    <h2><?php echo $title; ?>
+        <?php if (isset($info['name'])) { ?><small>
+        — <?php echo $info['name']; ?></small>
+        <?php } ?>
+    </h2>
 <ul class="clean tabs" id="list-tabs">
     <li <?php if (!$list) echo 'class="active"'; ?>><a href="#definition">
         <i class="icon-plus"></i> <?php echo __('Definition'); ?></a></li>
@@ -43,7 +45,6 @@ $info=Format::htmlchars(($errors && $_POST) ? array_merge($info,$_POST) : $info)
     <thead>
         <tr>
             <th colspan="2">
-                <h4><?php echo $title; ?></h4>
                 <em><?php echo __(
                 'Custom lists are used to provide drop-down lists for custom forms.'
                 ); ?>&nbsp;<i class="help-tip icon-question-sign" href="#custom_lists"></i></em>
diff --git a/include/staff/dynamic-lists.inc.php b/include/staff/dynamic-lists.inc.php
index a31784452e12f04ef8021d8276eadbfa5999256b..9f810d4a8f1653e586a469015089ef96caf549c2 100644
--- a/include/staff/dynamic-lists.inc.php
+++ b/include/staff/dynamic-lists.inc.php
@@ -1,22 +1,29 @@
 <form action="lists.php" method="POST" name="lists">
 
-<div class="pull-left" style="padding-top:5px;">
- <h2><?php echo __('Custom Lists'); ?></h2>
-</div>
-<div class="pull-right flush-right" style="padding-top:5px;padding-right:5px;">
-    <a href="lists.php?a=add" class="green button action-button"><i class="icon-plus-sign"></i> <?php
- echo __('Add New Custom List'); ?></a>
+<div class="sticky bar opaque">
+    <div class="content">
+        <div class="pull-left flush-left">
+            <h2><?php echo __('Custom Lists'); ?></h2>
+        </div>
+        <div class="pull-right flush-right">
+            <a href="lists.php?a=add" class="green button action-button"><i class="icon-plus-sign"></i> <?php
+                    echo __('Add New Custom List'); ?></a>
 
-    <span class="action-button" data-dropdown="#action-dropdown-more">
-       <i class="icon-caret-down pull-right"></i>
-        <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
-    </span>
-     <div id="action-dropdown-more" class="action-dropdown anchor-right">
-        <ul id="actions">
-          <li class="danger"><a class="confirm" data-name="delete" href="lists.php?a=delete">
-            <i class="icon-trash icon-fixed-width"></i>
-            <?php echo __('Delete'); ?></a></li>
-        </ul>
+            <span class="action-button" data-dropdown="#action-dropdown-more">
+                    <i class="icon-caret-down pull-right"></i>
+                    <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
+            </span>
+            <div id="action-dropdown-more" class="action-dropdown anchor-right">
+                <ul id="actions">
+                    <li class="danger">
+                        <a class="confirm" data-name="delete" href="lists.php?a=delete">
+                            <i class="icon-trash icon-fixed-width"></i>
+                            <?php echo __( 'Delete'); ?>
+                        </a>
+                    </li>
+                </ul>
+            </div>
+        </div>
     </div>
 </div>
 <div class="clear"></div>
@@ -33,13 +40,12 @@ $showing=$pageNav->showing().' '._N('custom list', 'custom lists', $count);
 <input type="hidden" name="do" value="mass_process" >
 <input type="hidden" id="action" name="a" value="" >
 <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
-    <caption>Custom Lists</caption>
     <thead>
         <tr>
-            <th width="7">&nbsp;</th>
-            <th><?php echo __('List Name'); ?></th>
-            <th><?php echo __('Created') ?></th>
-            <th><?php echo __('Last Updated'); ?></th>
+            <th width="4%">&nbsp;</th>
+            <th width="32%"><?php echo __('List Name'); ?></th>
+            <th width="32%"><?php echo __('Created') ?></th>
+            <th width="32%"><?php echo __('Last Updated'); ?></th>
         </tr>
     </thead>
     <tbody>
@@ -50,7 +56,7 @@ $showing=$pageNav->showing().' '._N('custom list', 'custom lists', $count);
             if ($ids && in_array($form->get('id'),$ids))
                 $sel = true; ?>
         <tr>
-            <td>
+            <td align="center">
                 <?php
                 if ($list->isDeleteable()) { ?>
                 <input width="7" type="checkbox" class="ckb" name="ids[]"
diff --git a/include/staff/email.inc.php b/include/staff/email.inc.php
index 5cc183baab6d05f5ce14e60d7d8feb6ed5219c39..08225cb95e1175634a5e03b3527e9f2717dc417e 100644
--- a/include/staff/email.inc.php
+++ b/include/staff/email.inc.php
@@ -2,7 +2,7 @@
 if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin()) die('Access Denied');
 $info = $qs = array();
 if($email && $_REQUEST['a']!='add'){
-    $title=__('Update Email');
+    $title=__('Update Email Address');
     $action='update';
     $submit_text=__('Save Changes');
     $info=$email->getInfo();
@@ -18,7 +18,7 @@ if($email && $_REQUEST['a']!='add'){
 
     $qs += array('id' => $email->getId());
 }else {
-    $title=__('Add New Email');
+    $title=__('Add New Email Address');
     $action='create';
     $submit_text=__('Submit');
     $info['ispublic']=isset($info['ispublic'])?$info['ispublic']:1;
@@ -34,7 +34,11 @@ if($email && $_REQUEST['a']!='add'){
 }
 $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
 ?>
-<h2><?php echo __('Email Address');?></h2>
+<h2><?php echo $title; ?>
+    <?php if (isset($info['email'])) { ?><small>
+    — <?php echo $info['email']; ?></small>
+    <?php } ?>
+</h2>
 <form action="emails.php?<?php echo Http::build_query($qs); ?>" method="post" id="save">
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="<?php echo $action; ?>">
@@ -44,7 +48,6 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
     <thead>
         <tr>
             <th colspan="2">
-                <h4><?php echo $title; ?></h4>
                 <em><strong><?php echo __('Email Information and Settings');?></strong></em>
             </th>
         </tr>
diff --git a/include/staff/emails.inc.php b/include/staff/emails.inc.php
index cad6b890a84ae01b65a453c1de9a15287c6b2f1d..78c296ce27e5a23928c41300e1e4759286d39c11 100644
--- a/include/staff/emails.inc.php
+++ b/include/staff/emails.inc.php
@@ -40,38 +40,43 @@ $def_dept_name = $cfg->getDefaultDept()->getName();
 $def_priority = $cfg->getDefaultPriority()->getDesc();
 ?>
 <form action="emails.php" method="POST" name="emails">
-
-<div class="pull-left" style="padding-top:5px;">
- <h2><?php echo __('Email Addresses');?></h2>
- </div>
-<div class="pull-right flush-right" style="padding-top:5px;padding-right:5px;">
-    <a href="emails.php?a=add" class="green button action-button"><i class="icon-plus-sign"></i> <?php echo __('Add New Email');?></a>
-    <span class="action-button" data-dropdown="#action-dropdown-more">
-       <i class="icon-caret-down pull-right"></i>
-        <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
-    </span>
-     <div id="action-dropdown-more" class="action-dropdown anchor-right">
-        <ul id="actions">
-          <li class="danger"><a class="confirm" data-name="delete" href="emails.php?a=delete">
-            <i class="icon-trash icon-fixed-width"></i>
-            <?php echo __('Delete'); ?></a></li>
-        </ul>
+    <div class="sticky bar opaque">
+        <div class="content">
+            <div class="pull-left flush-left">
+                <h2><?php echo __('Email Addresses');?></h2>
+            </div>
+            <div class="pull-right flush-right">
+                <a href="emails.php?a=add" class="green button action-button"><i class="icon-plus-sign"></i> <?php echo __('Add New Email');?></a>
+                <span class="action-button" data-dropdown="#action-dropdown-more">
+                            <i class="icon-caret-down pull-right"></i>
+                            <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
+                </span>
+                <div id="action-dropdown-more" class="action-dropdown anchor-right">
+                    <ul id="actions">
+                        <li class="danger">
+                            <a class="confirm" data-name="delete" href="emails.php?a=delete">
+                                <i class="icon-trash icon-fixed-width"></i>
+                                <?php echo __( 'Delete'); ?>
+                            </a>
+                        </li>
+                    </ul>
+                </div>
+            </div>
+        </div>
     </div>
-</div>
-<div class="clear"></div>
+    <div class="clear"></div>
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="mass_process" >
  <input type="hidden" id="action" name="a" value="" >
  <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
-    <caption><?php echo $showing; ?></caption>
     <thead>
         <tr>
-            <th width="7">&nbsp;</th>
-            <th width="400"><a <?php echo $email_sort; ?> href="emails.php?<?php echo $qstr; ?>&sort=email"><?php echo __('Email');?></a></th>
-            <th width="120"><a  <?php echo $priority_sort; ?> href="emails.php?<?php echo $qstr; ?>&sort=priority"><?php echo __('Priority');?></a></th>
-            <th width="250"><a  <?php echo $dept_sort; ?> href="emails.php?<?php echo $qstr; ?>&sort=dept"><?php echo __('Department');?></a></th>
-            <th width="110" nowrap><a  <?php echo $created_sort; ?>href="emails.php?<?php echo $qstr; ?>&sort=created"><?php echo __('Created');?></a></th>
-            <th width="150" nowrap><a  <?php echo $updated_sort; ?>href="emails.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated');?></a></th>
+            <th width="4%">&nbsp;</th>
+            <th width="38%"><a <?php echo $email_sort; ?> href="emails.php?<?php echo $qstr; ?>&sort=email"><?php echo __('Email');?></a></th>
+            <th width="8%"><a  <?php echo $priority_sort; ?> href="emails.php?<?php echo $qstr; ?>&sort=priority"><?php echo __('Priority');?></a></th>
+            <th width="15%"><a  <?php echo $dept_sort; ?> href="emails.php?<?php echo $qstr; ?>&sort=dept"><?php echo __('Department');?></a></th>
+            <th width="15%" nowrap><a  <?php echo $created_sort; ?>href="emails.php?<?php echo $qstr; ?>&sort=created"><?php echo __('Created');?></a></th>
+            <th width="20%" nowrap><a  <?php echo $updated_sort; ?>href="emails.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated');?></a></th>
         </tr>
     </thead>
     <tbody>
@@ -94,7 +99,7 @@ $def_priority = $cfg->getDefaultPriority()->getDesc();
                 $default=($id==$defaultId);
                 ?>
             <tr id="<?php echo $id; ?>">
-                <td width=7px>
+                <td align="center">
                   <input type="checkbox" class="ckb" name="ids[]"
                     value="<?php echo $id; ?>"
                     <?php echo $sel ? 'checked="checked" ' : ''; ?>
diff --git a/include/staff/faq-categories.inc.php b/include/staff/faq-categories.inc.php
index 1faf2e74f4554875ede3bc35e57cd2d90077931b..d2aeb0cb7bc2da4d6c0a5cd19115a9eba5a3e479 100644
--- a/include/staff/faq-categories.inc.php
+++ b/include/staff/faq-categories.inc.php
@@ -20,14 +20,14 @@ if(!defined('OSTSTAFFINC') || !$thisstaff) die('Access Denied');
             <span class="action-button muted" data-dropdown="#category-dropdown">
                 <i class="icon-caret-down pull-right"></i>
                 <span>
-                    <i class="icon icon-filter"></i>
+                    <i class="icon-filter"></i>
                     <?php echo __('Category'); ?>
                 </span>
             </span>
             <span class="action-button muted" data-dropdown="#topic-dropdown">
                 <i class="icon-caret-down pull-right"></i>
                 <span>
-                    <i class="icon icon-filter"></i>
+                    <i class="icon-filter"></i>
                     <?php echo __('Help Topic'); ?>
                 </span>
             </span>
@@ -93,8 +93,12 @@ foreach ($topics as $T) {
 
     </div>
 </form>
-<h2><?php echo __('Frequently Asked Questions');?></h2>
-<hr>
+    <div class="has_bottom_border" style="margin-bottom:5px; padding-top:5px;">
+        <div class="pull-left">
+            <h2><?php echo __('Frequently Asked Questions');?></h2>
+        </div>
+        <div class="clear"></div>
+    </div>
 <div>
 <?php
 if($_REQUEST['q'] || $_REQUEST['cid'] || $_REQUEST['topicId']) { //Search.
diff --git a/include/staff/faq-category.inc.php b/include/staff/faq-category.inc.php
index e00d068e19458ff7b056b3f7a62ac4333c05fc7e..d037f9f7bc5fadfc4f54c26c7f1d013ff5841274 100644
--- a/include/staff/faq-category.inc.php
+++ b/include/staff/faq-category.inc.php
@@ -2,32 +2,49 @@
 if(!defined('OSTSTAFFINC') || !$category || !$thisstaff) die('Access Denied');
 
 ?>
-<div class="pull-left" style="width:700px;padding-top:10px;">
+<div class="has_bottom_border" style="margin-bottom:5px; padding-top:5px;">
+<div class="pull-left">
   <h2><?php echo __('Frequently Asked Questions');?></h2>
 </div>
-<div class="pull-right flush-right" style="padding-top:5px;padding-right:5px;">&nbsp;</div>
-<div class="clear"></div>
-<br>
-<div>
-    <strong><?php echo $category->getName() ?></strong>
-    <span>(<?php echo $category->isPublic()?__('Public'):__('Internal'); ?>)</span>
-    <time class="faq"> <?php echo __('Last updated').' '. Format::daydatetime($category->getUpdateDate()); ?></time>
+<?php if ($thisstaff->hasPerm(FAQ::PERM_MANAGE)) {
+echo sprintf('<div class="pull-right flush-right">
+    <a class="green action-button" href="faq.php?cid=%d&a=add">'.__('Add New FAQ').'</a>
+    <span class="action-button" data-dropdown="#action-dropdown-more"
+          style="/*DELME*/ vertical-align:top; margin-bottom:0">
+        <i class="icon-caret-down pull-right"></i>
+        <span ><i class="icon-cog"></i>'. __('More').'</span>
+    </span>
+    <div id="action-dropdown-more" class="action-dropdown anchor-right">
+        <ul>
+            <li><a class="user-action" href="categories.php?id=%d">
+                <i class="icon-pencil icon-fixed-width"></i>'
+                .__('Edit Category').'</a>
+            </li>
+            <li class="danger">
+                <a class="user-action" href="categories.php">
+                    <i class="icon-trash icon-fixed-width"></i>'
+                    .__('Delete Category').'</a>
+            </li>
+        </ul>
+    </div>
+</div>', $category->getId(), $category->getId());
+} else {
+?><?php
+} ?>
+    <div class="clear"></div>
+
 </div>
-<div class="cat-desc">
-<?php echo Format::display($category->getDescription()); ?>
+<div class="faq-category">
+    <div style="margin-bottom:10px;">
+        <div class="faq-title pull-left"><?php echo $category->getName() ?></div>
+        <div class="faq-status inline">(<?php echo $category->isPublic()?__('Public'):__('Internal'); ?>)</div>
+        <div class="clear"><time class="faq"> <?php echo __('Last updated').' '. Format::daydatetime($category->getUpdateDate()); ?></time></div>
+    </div>
+    <div class="cat-desc has_bottom_border">
+    <?php echo Format::display($category->getDescription()); ?>
 </div>
 <?php
-if ($thisstaff->hasPerm(FAQ::PERM_MANAGE)) {
-    echo sprintf('<div class="cat-manage-bar"><a href="categories.php?id=%d" class="Icon editCategory">'.__('Edit Category').'</a>
-             <a href="categories.php" class="Icon deleteCategory">'.__('Delete Category').'</a>
-             <a href="faq.php?cid=%d&a=add" class="Icon newFAQ">'.__('Add New FAQ').'</a></div>',
-            $category->getId(),
-            $category->getId());
-} else {
-?>
-<hr>
-<?php
-}
+
 
 $faqs = $category->faqs
     ->constrain(array('attachments__inline' => 0))
@@ -37,7 +54,7 @@ if ($faqs->exists(true)) {
             <ol>';
     foreach ($faqs as $faq) {
         echo sprintf('
-            <li><a href="faq.php?id=%d" class="previewfaq">%s <span>- %s</span></a> %s</li>',
+            <li><strong><a href="faq.php?id=%d" class="previewfaq">%s <span>- %s</span></a> %s</strong></li>',
             $faq->getId(),$faq->getQuestion(),$faq->isPublished() ? __('Published'):__('Internal'),
             $faq->attachments ? '<i class="icon-paperclip"></i>' : ''
         );
@@ -48,3 +65,4 @@ if ($faqs->exists(true)) {
     echo '<strong>'.__('Category does not have FAQs').'</strong>';
 }
 ?>
+</div>
diff --git a/include/staff/faq-view.inc.php b/include/staff/faq-view.inc.php
index 2fe5159646e8fda535dc6027399ef4bbbd7b9bf7..8f8daf77cef0bb913f8883e29d5e46296f39ccd0 100644
--- a/include/staff/faq-view.inc.php
+++ b/include/staff/faq-view.inc.php
@@ -3,8 +3,30 @@ if(!defined('OSTSTAFFINC') || !$faq || !$thisstaff) die('Access Denied');
 
 $category=$faq->getCategory();
 
-?>
-<h2><?php echo __('Frequently Asked Questions');?></h2>
+?><div class="has_bottom_border" style="padding-top:5px;">
+<div class="pull-left"><h2><?php echo __('Frequently Asked Questions');?></h2></div>
+<div class="pull-right flush-right">
+<?php
+$query = array();
+parse_str($_SERVER['QUERY_STRING'], $query);
+$query['a'] = 'print';
+$query['id'] = $faq->getId();
+$query = http_build_query($query); ?>
+    <a href="faq.php?<?php echo $query; ?>" class="no-pjax action-button">
+    <i class="icon-print"></i>
+        <?php echo __('Print'); ?>
+    </a>
+<?php
+if ($thisstaff->hasPerm(FAQ::PERM_MANAGE)) { ?>
+    <a href="faq.php?id=<?php echo $faq->getId(); ?>&a=edit" class="action-button">
+    <i class="icon-edit"></i>
+        <?php echo __('Edit FAQ'); ?>
+    </a>
+<?php } ?>
+</div><div class="clear"></div>
+
+</div>
+
 <div id="breadcrumbs">
     <a href="kb.php"><?php echo __('All Categories');?></a>
     &raquo; <a href="kb.php?cid=<?php echo $category->getId(); ?>"><?php echo $category->getName(); ?></a>
@@ -16,13 +38,13 @@ $category=$faq->getCategory();
 <section>
     <header><?php echo __('Attachments');?>:</header>
 <?php foreach ($attachments as $att) { ?>
-    <div>
+<div>
     <i class="icon-paperclip pull-left"></i>
     <a target="_blank" href="<?php echo $att->file->getDownloadUrl(); ?>"
         class="attachment no-pjax">
         <?php echo Format::htmlchars($att->getFilename()); ?>
     </a>
-    </div>
+</div>
 <?php } ?>
 </section>
 <?php } ?>
@@ -67,25 +89,7 @@ if ($otherLangs) { ?>
 </div>
 
 <div class="faq-content">
-<div class="faq-manage pull-right">
-<?php
-$query = array();
-parse_str($_SERVER['QUERY_STRING'], $query);
-$query['a'] = 'print';
-$query['id'] = $faq->getId();
-$query = http_build_query($query); ?>
-    <a href="faq.php?<?php echo $query; ?>" class="no-pjax action-button">
-    <i class="icon-print"></i>
-        <?php echo __('Print'); ?>
-    </a>
-<?php
-if ($thisstaff->hasPerm(FAQ::PERM_MANAGE)) { ?>
-    <a href="faq.php?id=<?php echo $faq->getId(); ?>&a=edit" class="action-button">
-    <i class="icon-edit"></i>
-        <?php echo __('Edit FAQ'); ?>
-    </a>
-<?php } ?>
-</div>
+
 
 <div class="faq-title flush-left"><?php echo $faq->getLocalQuestion() ?>
 </div>
diff --git a/include/staff/faq.inc.php b/include/staff/faq.inc.php
index 54c0a68badf327d8c618671f8bff961141909a42..dace2536a7989e2a556aec3961fbc0e3ecd02977 100644
--- a/include/staff/faq.inc.php
+++ b/include/staff/faq.inc.php
@@ -249,8 +249,7 @@ echo $attrs; ?>><?php echo $draft ?: $answer;
 
 <div class="tab_content" style="display:none;" id="notes">
     <div>
-        <b><?php echo __('Internal Notes');?></b>:
-        <div class="faded"><?php echo __("Be liberal, they're internal");?></div>
+        <b><?php echo __('Internal Notes');?></b>:<span class="faded"><?php echo __("Be libergsdfgal, they're internal");?></span>
     </div>
     <div style="margin-top:10px"></div>
     <textarea class="richtext no-bar" name="notes" cols="21"
diff --git a/include/staff/filter.inc.php b/include/staff/filter.inc.php
index aa958eb12dbc0210c2724bddc153aeb2907a5890..8767a0ec8c790103f7549558308590983d0aa26c 100644
--- a/include/staff/filter.inc.php
+++ b/include/staff/filter.inc.php
@@ -9,274 +9,329 @@ if($filter && $_REQUEST['a']!='add'){
     $title=__('Update Filter');
     $action='update';
     $submit_text=__('Save Changes');
-    $info=array_merge($filter->getInfo(),$filter->getFlatRules());
+    $info=array_merge($filter->getInfo());
     $info['id']=$filter->getId();
+    $info['rules'] = $filter->getRules();
     $qs += array('id' => $filter->getId());
 }else {
     $title=__('Add New Filter');
     $action='add';
     $submit_text=__('Add Filter');
     $info['isactive']=isset($info['isactive'])?$info['isactive']:0;
+    $info['rules'] = array();
     $qs += array('a' => $_REQUEST['a']);
 }
 $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
 ?>
 <form action="filters.php?<?php echo Http::build_query($qs); ?>" method="post" id="save">
- <?php csrf_token(); ?>
- <input type="hidden" name="do" value="<?php echo $action; ?>">
- <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
- <input type="hidden" name="id" value="<?php echo $info['id']; ?>">
- <h2><?php echo __('Ticket Filter');?></h2>
- <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
-    <thead>
-        <tr>
-            <th colspan="2">
-                <h4><?php echo $title; ?></h4>
-                <em><?php echo __('Filters are executed based on execution order. Filter can target specific ticket source.');?></em>
-            </th>
-        </tr>
-    </thead>
-    <tbody>
-        <tr>
-            <td width="180" class="required">
-              <?php echo __('Filter Name');?>:
-            </td>
-            <td>
-                <input type="text" size="30" name="name" value="<?php echo $info['name']; ?>"
-                    autofocus>
-                &nbsp;<span class="error">*&nbsp;<?php echo $errors['name']; ?></span>
-            </td>
-        </tr>
-        <tr>
-            <td width="180" class="required">
-              <?php echo __('Execution Order');?>:
-            </td>
-            <td>
-                <input type="text" size="6" name="execorder" value="<?php echo $info['execorder']; ?>">
-                <em>(1...99)</em>
-                &nbsp;<span class="error">*&nbsp;<?php echo $errors['execorder']; ?></span>
-                &nbsp;&nbsp;&nbsp;
-                <label class="inline checkbox">
-                <input type="checkbox" name="stop_onmatch" value="1" <?php echo $info['stop_onmatch']?'checked="checked"':''; ?> >
-                <?php echo __('<strong>Stop</strong> processing further on match!');?>
-                </label>
-                &nbsp;<i class="help-tip icon-question-sign" href="#execution_order"></i>
-            </td>
-        </tr>
-        <tr>
-            <td width="180" class="required">
-                <?php echo __('Filter Status');?>:
-            </td>
-            <td>
-                <input type="radio" name="isactive" value="1" <?php echo
-                $info['isactive']?'checked="checked"':''; ?>> <?php echo __('Active'); ?>
-                <input type="radio" name="isactive" value="0" <?php echo !$info['isactive']?'checked="checked"':''; ?>
-                > <?php echo __('Disabled'); ?>
-                &nbsp;<span class="error">*&nbsp;</span>
-            </td>
-        </tr>
-        <tr>
-            <td width="180" class="required">
-                <?php echo __('Target Channel');?>:
-            </td>
-            <td>
-                <select name="target">
-                   <option value="">&mdash; <?php echo __('Select a Channel');?> &mdash;</option>
-                   <?php
-                   foreach(Filter::getTargets() as $k => $v) {
-                       echo sprintf('<option value="%s" %s>%s</option>',
-                               $k, (($k==$info['target'])?'selected="selected"':''), $v);
-                    }
-                    $sql='SELECT email_id,email,name FROM '.EMAIL_TABLE.' email ORDER by name';
-                    if(($res=db_query($sql)) && db_num_rows($res)) {
-                        echo sprintf('<OPTGROUP label="%s">', __('System Emails'));
-                        while(list($id,$email,$name)=db_fetch_row($res)) {
-                            $selected=($info['email_id'] && $id==$info['email_id'])?'selected="selected"':'';
-                            if($name)
-                                $email=Format::htmlchars("$name <$email>");
-                            echo sprintf('<option value="%d" %s>%s</option>',$id,$selected,$email);
+    <?php csrf_token(); ?>
+    <input type="hidden" name="do" value="<?php echo $action; ?>">
+    <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
+    <input type="hidden" name="id" value="<?php echo $info['id']; ?>">
+    <h2><?php echo $title; ?>
+        <?php if (isset($info['name'])) { ?><small>
+        — <?php echo $info['name']; ?></small>
+        <?php } ?>
+    </h2>
+    <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
+        <thead>
+            <tr>
+                <th colspan="2">
+                    <em><?php echo __('Filters are executed based on execution order. Filter can target specific ticket source.');?></em>
+                </th>
+            </tr>
+        </thead>
+        <tbody>
+            <tr>
+                <td width="180" class="required">
+                  <?php echo __('Filter Name');?>:
+                </td>
+                <td>
+                    <input type="text" size="30" name="name" value="<?php echo $info['name']; ?>"
+                        autofocus>
+                    &nbsp;<span class="error">*&nbsp;<?php echo $errors['name']; ?></span>
+                </td>
+            </tr>
+            <tr>
+                <td width="180" class="required">
+                  <?php echo __('Execution Order');?>:
+                </td>
+                <td>
+                    <input type="text" size="6" name="execorder" value="<?php echo $info['execorder']; ?>">
+                    <em>(1...99)</em>
+                    &nbsp;<span class="error">*&nbsp;<?php echo $errors['execorder']; ?></span>
+                    &nbsp;&nbsp;&nbsp;
+                    <label class="inline checkbox">
+                    <input type="checkbox" name="stop_onmatch" value="1" <?php echo $info['stop_onmatch']?'checked="checked"':''; ?> >
+                    <?php echo __('<strong>Stop</strong> processing further on match!');?>
+                    </label>
+                    &nbsp;<i class="help-tip icon-question-sign" href="#execution_order"></i>
+                </td>
+            </tr>
+            <tr>
+                <td width="180" class="required">
+                    <?php echo __('Filter Status');?>:
+                </td>
+                <td>
+                    <input type="radio" name="isactive" value="1" <?php echo
+                    $info['isactive']?'checked="checked"':''; ?>> <?php echo __('Active'); ?>
+                    <input type="radio" name="isactive" value="0" <?php echo !$info['isactive']?'checked="checked"':''; ?>
+                    > <?php echo __('Disabled'); ?>
+                    &nbsp;<span class="error">*&nbsp;</span>
+                </td>
+            </tr>
+            <tr>
+                <td width="180" class="required">
+                    <?php echo __('Target Channel');?>:
+                </td>
+                <td>
+                    <select name="target">
+                       <option value="">&mdash; <?php echo __('Select a Channel');?> &mdash;</option>
+                       <?php
+                       foreach(Filter::getTargets() as $k => $v) {
+                           echo sprintf('<option value="%s" %s>%s</option>',
+                                   $k, (($k==$info['target'])?'selected="selected"':''), $v);
                         }
-                        echo '</OPTGROUP>';
-                    }
-                    ?>
-                </select>
-                &nbsp;
-                <span class="error">*&nbsp;<?php echo $errors['target']; ?></span>&nbsp;
-                <i class="help-tip icon-question-sign" href="#target_channel"></i>
-            </td>
-        </tr>
-        <tr>
-            <th colspan="2">
-                <em><strong><?php echo __('Filter Rules');?></strong>: <?php
-                echo __('Rules are applied based on the criteria.');?>&nbsp;<span class="error">*&nbsp;<?php echo
-                $errors['rules']; ?></span></em>
-            </th>
-        </tr>
-        <tr>
-            <td colspan=2>
-               <em><?php echo __('Rules Matching Criteria');?>:</em>
-                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                <label>
-                <input type="radio" name="match_all_rules" value="1" <?php echo $info['match_all_rules']?'checked="checked"':''; ?>>
-                    <?php echo __('Match All');?>
-                </label>
-                <span style="display:inline-block;width:10px"> </span>
-                <label>
-                <input type="radio" name="match_all_rules" value="0" <?php echo !$info['match_all_rules']?'checked="checked"':''; ?>>
-                    <?php echo __('Match Any');?>
-                </label>
-                <span class="error">*</span>
-                <em>(<?php echo __('case-insensitive comparison');?>)</em>
-                &nbsp;<i class="help-tip icon-question-sign" href="#rules_matching_criteria"></i>
-
-            </td>
-        </tr>
-        <?php
-        $n=($filter?$filter->getNumRules():0)+2; //2 extra rules of unlimited.
-        for($i=1; $i<=$n; $i++){ ?>
-        <tr id="r<?php echo $i; ?>">
-            <td colspan="2">
-                <div>
-                    <select style="max-width: 200px;" name="rule_w<?php echo $i; ?>">
-                        <option value="">&mdash; <?php echo __('Select One');?> &mdash;</option>
-                        <?php
-                        foreach ($matches as $group=>$ms) { ?>
-                            <optgroup label="<?php echo __($group); ?>"><?php
-                            foreach ($ms as $k=>$v) {
-                                $sel=($info["rule_w$i"]==$k)?'selected="selected"':'';
-                                echo sprintf('<option value="%s" %s>%s</option>',
-                                    $k,$sel,__($v));
-                            } ?>
-                        </optgroup>
-                        <?php } ?>
-                    </select>
-                    <select name="rule_h<?php echo $i; ?>">
-                        <option value="0">&mdash; <?php echo __('Select One');?> &mdash;</option>
-                        <?php
-                        foreach($match_types as $k=>$v){
-                            $sel=($info["rule_h$i"]==$k)?'selected="selected"':'';
-                            echo sprintf('<option value="%s" %s>%s</option>',
-                                $k,$sel,$v);
+                        $sql='SELECT email_id,email,name FROM '.EMAIL_TABLE.' email ORDER by name';
+                        if(($res=db_query($sql)) && db_num_rows($res)) {
+                            echo sprintf('<OPTGROUP label="%s">', __('System Emails'));
+                            while(list($id,$email,$name)=db_fetch_row($res)) {
+                                $selected=($info['email_id'] && $id==$info['email_id'])?'selected="selected"':'';
+                                if($name)
+                                    $email=Format::htmlchars("$name <$email>");
+                                echo sprintf('<option value="%d" %s>%s</option>',$id,$selected,$email);
+                            }
+                            echo '</OPTGROUP>';
                         }
                         ?>
-                    </select>&nbsp;
-                    <input class="ltr" type="text" size="60" name="rule_v<?php echo $i; ?>" value="<?php echo $info["rule_v$i"]; ?>">
-                    &nbsp;<span class="error">&nbsp;<?php echo $errors["rule_$i"]; ?></span>
-                <?php
-                if($info["rule_w$i"] || $info["rule_h$i"] || $info["rule_v$i"]){ ?>
-                <div class="pull-right" style="padding-right:20px;"><a href="#" class="clearrule">(<?php echo __('clear');?>)</a></div>
+                    </select>
+                    &nbsp;
+                    <span class="error">*&nbsp;<?php echo $errors['target']; ?></span>&nbsp;
+                    <i class="help-tip icon-question-sign" href="#target_channel"></i>
+                </td>
+            </tr>
+        </tbody>
+    </table>
+    <ul class="clean tabs" style="margin-top:20px;" id="filter-tabs">
+        <li class="active"><a href="#filter_rules"><i class="icon-filter"></i> <?php echo __('Filter Rules'); ?></a></li>
+        <li><a href="#filter_actions"><i class="icon-bolt"></i> <?php echo __('Filter Actions'); ?></a></li>
+        <li><a href="#internal_notes"><i class="icon-file-text-alt"></i> <?php echo __('Internal Notes'); ?></a></li>
+    </ul>
+    <!-- ====================== FILTER RULES ========================== -->
+    <div class="tab_content" id="filter_rules">
+        <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
+            <thead>
+                <tr>
+                    <th colspan="2" style="text-align:left;">
+                        <em><strong><?php echo __('Filter Rules');?></strong>: <?php
+                        echo __('Rules are applied based on the criteria.');?>&nbsp;<span class="error">*&nbsp;<?php echo
+                        $errors['rules']; ?></span></em>
+                    </th>
+                </tr>
+            </thead>
+            <tbody id="rules">
+                <tr>
+                    <td colspan=2>
+                       <em><?php echo __('Rules Matching Criteria');?>:</em>
+                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                        <label>
+                        <input type="radio" name="match_all_rules" value="1" <?php echo $info['match_all_rules']?'checked="checked"':''; ?>>
+                            <?php echo __('Match All');?>
+                        </label>
+                        <span style="display:inline-block;width:10px"> </span>
+                        <label>
+                        <input type="radio" name="match_all_rules" value="0" <?php echo !$info['match_all_rules']?'checked="checked"':''; ?>>
+                            <?php echo __('Match Any');?>
+                        </label>
+                        <span class="error">*</span>
+                        <em>(<?php echo __('case-insensitive comparison');?>)</em>
+                        &nbsp;<i class="help-tip icon-question-sign" href="#rules_matching_criteria"></i>
+                    </td>
+                </tr>
                 <?php
+                foreach ($info['rules'] as $i=>$rule) { ?>
+                <tr>
+                    <td colspan="2">
+                        <select style="max-width: 200px;" name="rules[<?php echo $i; ?>][w]">
+                            <option value="">&mdash; <?php echo __('Select One');?> &mdash;</option>
+                                <?php
+                                foreach ($matches as $group=>$ms) { ?>
+                                    <optgroup label="<?php echo __($group); ?>"><?php
+                                    foreach ($ms as $k=>$v) {
+                                        $sel=($rule["w"]==$k)?'selected="selected"':'';
+                                        echo sprintf('<option value="%s" %s>%s</option>',
+                                            $k,$sel,__($v));
+                                    } ?>
+                                </optgroup>
+                                <?php } ?>
+                            </select>
+                            <select name="rules[<?php echo $i; ?>][h]">
+                                <option value="0">&mdash; <?php echo __('Select One');?> &mdash;</option>
+                                <?php
+                                    foreach($match_types as $k=>$v){
+                                    $sel=($rule["h"]==$k)?'selected="selected"':'';
+                                    echo sprintf('<option value="%s" %s>%s</option>',
+                                        $k,$sel,$v);
+                                }
+                                ?>
+                            </select>&nbsp;
+                            <input type="text" size="60" name="rules[<?php echo $i; ?>][v]" value="<?php echo $rule["v"]; ?>">
+                        <div class="pull-right" style="padding-right:20px;"><a href="#" class="clearrule"
+                            onclick="javascript: $(this).closest('tr').remove();">(<?php echo __('clear');?>)</a></div>
+                        <div class="error"><?php echo $errors["rule_$i"]; ?></div>
+                    </td>
+                </tr>
+<?php           $maxi = max($maxi ?: 0, $i+1);
                 } ?>
-                </div>
-            </td>
-        </tr>
-        <?php
-            if($i>=25) //Hardcoded limit of 25 rules...also see class.filter.php
-               break;
-        } ?>
-        <tr>
-            <th colspan="2">
-                <em><strong><?php echo __('Filter Actions');?></strong>:
-                <div><?php
-                    echo __('Can be overwridden by other filters depending on processing order.');
-                ?><br/><?php
-                    echo __('Actions are executed in the order declared below');
-                ?></em>
-            </th>
-        </tr>
-    </tbody>
-    <tbody id="dynamic-actions" class="sortable-rows">
-<?php
-$existing = array();
-if ($filter) { foreach ($filter->getActions() as $A) {
-    $existing[] = $A->type;
-?>
-        <tr style="background-color:white"><td><i class="icon-bolt icon-large icon-muted"></i>
-            <?php echo $A->getImpl()->getName(); ?>:</td>
-            <td><div style="position:relative"><?php
-                $form = $A->getImpl()->getConfigurationForm($_POST ?: false);
-                // XXX: Drop this when the ORM supports proper caching
-                $form->isValid();
-                include STAFFINC_DIR . 'templates/dynamic-form-simple.tmpl.php';
-?>
-                <input type="hidden" name="actions[]" value="I<?php echo $A->getId(); ?>"/>
-                <div class="pull-right" style="position:absolute;top:2px;right:2px;">
-                    <a href="#" title="<?php echo __('clear'); ?>" onclick="javascript:
-        if (!confirm(__('You sure?')))
-            return false;
-        $(this).closest('td').find('input[name=\'actions[]\']')
-            .val(function(i,v) { return 'D' + v.substring(1); });
-        $(this).closest('tr').fadeOut(400, function() { $(this).hide(); });
-        return false;"><i class="icon-trash"></i></a>
-                </div>
-</div>
-            </td>
-        </tr>
-<?php } } ?>
-    </tbody>
-    <tbody>
-        <tr>
-            <td><strong><i class="icon-plus-sign"></i>
-                <?php echo __('Add'); ?>:
-            </strong></td>
-            <td>
+            </tbody>
+            <tbody class="hidden" id="new-rule-template">
+                <tr>
+                    <td colspan="2">
+                        <select style="max-width: 200px;" data-name="rulew">
+                            <option value="">&mdash; <?php echo __('Select One');?> &mdash;</option>
+                            <?php
+                            foreach ($matches as $group=>$ms) { ?>
+                                <optgroup label="<?php echo __($group); ?>"><?php
+                                foreach ($ms as $k=>$v) {
+                                    echo sprintf('<option value="%s">%s</option>',
+                                        $k,__($v));
+                                } ?>
+                            </optgroup>
+                            <?php } ?>
+                        </select>
+                        <select data-name="ruleh">
+                            <option value="0">&mdash; <?php echo __('Select One');?> &mdash;</option>
+                            <?php
+                                foreach($match_types as $k=>$v){
+                                echo sprintf('<option value="%s">%s</option>',
+                                    $k,$v);
+                            }
+                            ?>
+                        </select>&nbsp;
+                        <input type="text" size="60" data-name="rulev">
+                    </td>
+                </tr>
+            </tbody>
+        </table>
+        <div style="padding: 5px">
+            <button class="green button" type="button" id="add-rule">
+                <i class="icon-plus-sign"></i> <?php echo __('Add Rule'); ?>
+            </button>
+        </div>
+    </div>
+    <!-- ======================= FILTER ACTIONS ========================= -->
+    <div class="tab_content hidden" id="filter_actions">
+        <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
+            <thead>
+                <tr>
+                    <th colspan="2">
+                        <em><strong><?php echo __('Filter Actions');?></strong>:
+                        <div><?php
+                            echo __('Can be overwridden by other filters depending on processing order.');
+                        ?><br/><?php
+                            echo __('Actions are executed in the order declared below');
+                            ?></div></em>
+                    </th>
+                </tr>
+            </thead>
+            <tbody id="dynamic-actions" class="sortable-rows">
+                <?php
+                $existing = array();
+                if ($filter) { foreach ($filter->getActions() as $A) {
+                    $existing[] = $A->type;
+                ?>
+                <tr style="background-color:white"><td><i class="icon-sort icon-large icon-muted"></i>
+                    <?php echo $A->getImpl()->getName(); ?>:</td>
+                    <td>
+                        <div style="position:relative"><?php
+                        $form = $A->getImpl()->getConfigurationForm($_POST ?: false);
+                        // XXX: Drop this when the ORM supports proper caching
+                        $form->isValid();
+                        include STAFFINC_DIR . 'templates/dynamic-form-simple.tmpl.php';
+                        ?>
+                        <input type="hidden" name="actions[]" value="I<?php echo $A->getId(); ?>"/>
+                        <div class="pull-right" style="position:absolute;top:2px;right:2px;">
+                            <a href="#" title="<?php echo __('clear'); ?>" onclick="javascript:
+                                if (!confirm(__('You sure?')))
+                                return false;
+                                $(this).closest('td').find('input[name=\'actions[]\']')
+                                    .val(function(i,v) { return 'D' + v.substring(1); });
+                                $(this).closest('tr').fadeOut(400, function() { $(this).hide(); });
+                                return false;"><i class="icon-trash"></i></a>
+                            </div>
+                        </div>
+                    </td>
+                </tr>
+                <?php } } ?>
+                </tbody>
+            </table>
+            <div style="padding: 5px">
+                <i class="icon-plus-sign"></i>
                 <select name="new-action" id="new-action-select"
-                    onchange="javascript: $('#new-action-btn').trigger('click');">
+                        onchange="javascript: $('#new-action-btn').trigger('click');">
                     <option value=""><?php echo __('— Select an Action —'); ?></option>
-<?php
-$current_group = '';
-foreach (FilterAction::allRegistered() as $group=>$actions) {
-    if ($group && $current_group != $group) {
-        if ($current_group) echo '</optgroup>';
-        $current_group = $group;
-        ?><optgroup label="<?php echo Format::htmlchars($group); ?>"><?php
-    }
-    foreach ($actions as $type=>$name) {
-?>
-                <option data-title="<?php echo $name; ?>" value="<?php echo $type; ?>"
-                    data-multi-use="<?php echo $mu = FilterAction::lookupByType($type)->hasFlag(TriggerAction::FLAG_MULTI_USE); ?> " <?php
-                    if (in_array($type, $existing) && !$mu) echo 'disabled="disabled"';
-                ?>><?php echo $name; ?></option>
-<?php }
-} ?>
+                    <?php
+                    $current_group = '';
+                    foreach (FilterAction::allRegistered() as $group=>$actions) {
+                        if ($group && $current_group != $group) {
+                            if ($current_group) echo '</optgroup>';
+                            $current_group = $group;
+                            ?><optgroup label="<?php echo Format::htmlchars($group); ?>"><?php
+                        }
+                        foreach ($actions as $type=>$name) {
+                    ?>
+                    <option data-title="<?php echo $name; ?>" value="<?php echo $type; ?>"
+                            data-multi-use="<?php echo $mu = FilterAction::lookupByType($type)->hasFlag(TriggerAction::FLAG_MULTI_USE); ?> " <?php
+                            if (in_array($type, $existing) && !$mu) echo 'disabled="disabled"';
+                            ?>><?php echo $name; ?></option>
+                    <?php }
+                    } ?>
                 </select>
                 <button id="new-action-btn" type="button" class="inline green button" onclick="javascript:
-        var dropdown = $('#new-action-select'), selected = dropdown.find(':selected');
-        dropdown.val('');
-        $('#dynamic-actions')
-          .append($('<tr></tr>')
-            .append($('<td></td>')
-              .text(selected.data('title') + ':')
-            ).append($('<td></td>')
-              .append($('<em></em>').text(__('Loading ...')))
-              .load('ajax.php/filter/action/' + selected.val() + '/config', function() {
-                if (!selected.data('multiUse')) selected.prop('disabled', true);
-              })
-            )
-          ).append(
-            $('<input>').attr({type:'hidden',name:'actions[]',value:'N'+selected.val()})
-          );"><?php echo __('Add'); ?></button>
-            </td>
-        </tr>
-        <tr>
-            <th colspan="2">
-                <em><strong><?php echo __('Internal Notes');?></strong>: <?php
-                    echo __("be liberal, they're internal");?></em>
-            </th>
-        </tr>
-        <tr>
-            <td colspan=2>
-                <textarea class="richtext no-bar" name="notes" cols="21"
-                    rows="8" style="width: 80%;"><?php echo $info['notes']; ?></textarea>
-            </td>
-        </tr>
-    </tbody>
-</table>
-<p style="text-align:center;">
-    <input type="submit" name="submit" value="<?php echo $submit_text; ?>">
-    <input type="reset"  name="reset"  value="<?php echo __('Reset');?>">
-    <input type="button" name="cancel" value="<?php echo __('Cancel');?>" onclick='window.location.href="filters.php"'>
-</p>
+                    var dropdown = $('#new-action-select'), selected = dropdown.find(':selected');
+                    dropdown.val('');
+                    $('#dynamic-actions')
+                      .append($('<tr></tr>')
+                        .append($('<td></td>')
+                          .text(selected.data('title') + ':')
+                        ).append($('<td></td>')
+                          .append($('<em></em>').text(__('Loading ...')))
+                          .load('ajax.php/filter/action/' + selected.val() + '/config', function() {
+                            if (!selected.data('multiUse')) selected.prop('disabled', true);
+                          })
+                        )
+                      ).append(
+                        $('<input>').attr({type:'hidden',name:'actions[]',value:'N'+selected.val()})
+                      );"><?php echo __('Add'); ?>
+                </button>
+            </div>
+    </div>
+    <!-- ======================== INTERNAL NOTES ======================== -->
+    <div class="tab_content hidden" id="internal_notes">
+        <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
+            <thead>
+                <tr>
+                    <th colspan="2">
+                        <em><strong><?php echo __('Internal Notes');?></strong>: <?php
+                            echo __("be liberal, they're internal");?></em>
+                    </th>
+                </tr>
+            </thead>
+            <tbody>
+                <tr>
+                    <td colspan=2>
+                        <textarea class="richtext no-bar" name="notes" cols="21"
+                            rows="8" style="width: 80%;"><?php echo $info['notes']; ?></textarea>
+                    </td>
+                </tr>
+            </tbody>
+        </table>
+    </div>
+    <p style="text-align:center;">
+        <input type="submit" name="submit" value="<?php echo $submit_text; ?>">
+        <input type="reset"  name="reset"  value="<?php echo __('Reset');?>">
+        <input type="button" name="cancel" value="<?php echo __('Cancel');?>" onclick='window.location.href="filters.php"'>
+    </p>
 </form>
 <script type="text/javascript">
    var fixHelper = function(e, ui) {
@@ -285,5 +340,16 @@ foreach (FilterAction::allRegistered() as $group=>$actions) {
       });
       return ui;
    };
-   $('#dynamic-actions').sortable({helper: fixHelper, opacity: 0.5});
+   $(function() {
+     $('#dynamic-actions').sortable({helper: fixHelper, opacity: 0.5});
+     var next = <?php echo $maxi; ?>;
+     $('#add-rule').click(function() {
+       var clone = $('#new-rule-template tr').clone();
+       clone.find('[data-name=rulew]').attr('name', 'rules['+next+'][w]');
+       clone.find('[data-name=ruleh]').attr('name', 'rules['+next+'][h]');
+       clone.find('[data-name=rulev]').attr('name', 'rules['+next+'][v]');
+       clone.appendTo('#rules');
+       next++;
+     });
+   });
 </script>
diff --git a/include/staff/filters.inc.php b/include/staff/filters.inc.php
index 5d81d4e00864be5a335383fcac9f71c24d743fa6..25a753302064dc9ebf177eca8e83535cd58d45f2 100644
--- a/include/staff/filters.inc.php
+++ b/include/staff/filters.inc.php
@@ -45,49 +45,57 @@ else
 
 ?>
 <form action="filters.php" method="POST" name="filters">
-
-<div class="pull-left" style="padding-top:5px;">
- <h2><?php echo __('Ticket Filters');?></h2>
-</div>
-<div class="pull-right flush-right" style="padding-top:5px;padding-right:5px;">
- <a href="filters.php?a=add" class="green button action-button"><i class="icon-plus-sign"></i> <?php echo __('Add New Filter');?></a>
-
-    <span class="action-button" data-dropdown="#action-dropdown-more">
-       <i class="icon-caret-down pull-right"></i>
-        <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
-    </span>
-     <div id="action-dropdown-more" class="action-dropdown anchor-right">
-        <ul id="actions">
-          <li><a class="confirm" data-name="enable" href="filters.php?a=enable">
-            <i class="icon-ok-sign icon-fixed-width"></i>
-            <?php echo __('Enable'); ?></a></li>
-          <li><a class="confirm" data-name="disable" href="filters.php?a=disable">
-            <i class="icon-ban-circle icon-fixed-width"></i>
-            <?php echo __('Disable'); ?></a></li>
-          <li class="danger"><a class="confirm" data-name="delete" href="filters.php?a=delete">
-            <i class="icon-trash icon-fixed-width"></i>
-            <?php echo __('Delete'); ?></a></li>
-        </ul>
+<div class="sticky bar opaque">
+    <div class="content">
+        <div class="pull-left flush-left">
+            <h2><?php echo __('Ticket Filters');?></h2>
+        </div>
+        <div class="pull-right flush-right">
+            <a href="filters.php?a=add" class="green button action-button"><i class="icon-plus-sign"></i> <?php echo __('Add New Filter');?></a>
+            <span class="action-button" data-dropdown="#action-dropdown-more">
+                <i class="icon-caret-down pull-right"></i>
+                <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
+            </span>
+            <div id="action-dropdown-more" class="action-dropdown anchor-right">
+                <ul id="actions">
+                    <li>
+                        <a class="confirm" data-name="enable" href="filters.php?a=enable">
+                            <i class="icon-ok-sign icon-fixed-width"></i>
+                            <?php echo __( 'Enable'); ?>
+                        </a>
+                    </li>
+                    <li>
+                        <a class="confirm" data-name="disable" href="filters.php?a=disable">
+                            <i class="icon-ban-circle icon-fixed-width"></i>
+                            <?php echo __( 'Disable'); ?>
+                        </a>
+                    </li>
+                    <li class="danger">
+                        <a class="confirm" data-name="delete" href="filters.php?a=delete">
+                            <i class="icon-trash icon-fixed-width"></i>
+                            <?php echo __( 'Delete'); ?>
+                        </a>
+                    </li>
+                </ul>
+            </div>
+        </div>
     </div>
-
-
 </div>
 <div class="clear"></div>
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="mass_process" >
 <input type="hidden" id="action" name="a" value="" >
  <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
-    <caption><?php echo $showing; ?></caption>
     <thead>
         <tr>
-            <th width="7">&nbsp;</th>
-            <th width="320"><a <?php echo $name_sort; ?> href="filters.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name');?></a></th>
-            <th width="80"><a  <?php echo $status_sort; ?> href="filters.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Status');?></a></th>
-            <th width="80" style="text-align:center;"><a  <?php echo $order_sort; ?> href="filters.php?<?php echo $qstr; ?>&sort=order"><?php echo __('Order');?></a></th>
-            <th width="80" style="text-align:center;"><a  <?php echo $rules_sort; ?> href="filters.php?<?php echo $qstr; ?>&sort=rules"><?php echo __('Rules');?></a></th>
-            <th width="100"><a  <?php echo $target_sort; ?> href="filters.php?<?php echo $qstr; ?>&sort=target"><?php echo __('Target');?></a></th>
-            <th width="120" nowrap><a  <?php echo $created_sort; ?>href="filters.php?<?php echo $qstr; ?>&sort=created"><?php echo __('Date Added');?></a></th>
-            <th width="150" nowrap><a  <?php echo $updated_sort; ?>href="filters.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated');?></a></th>
+            <th width="4%">&nbsp;</th>
+            <th width="32%"><a <?php echo $name_sort; ?> href="filters.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name');?></a></th>
+            <th width="8%"><a  <?php echo $status_sort; ?> href="filters.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Status');?></a></th>
+            <th width="8%" style="text-align:center;"><a  <?php echo $order_sort; ?> href="filters.php?<?php echo $qstr; ?>&sort=order"><?php echo __('Order');?></a></th>
+            <th width="8%" style="text-align:center;"><a  <?php echo $rules_sort; ?> href="filters.php?<?php echo $qstr; ?>&sort=rules"><?php echo __('Rules');?></a></th>
+            <th width="10%"><a  <?php echo $target_sort; ?> href="filters.php?<?php echo $qstr; ?>&sort=target"><?php echo __('Target');?></a></th>
+            <th width="12%" nowrap><a  <?php echo $created_sort; ?>href="filters.php?<?php echo $qstr; ?>&sort=created"><?php echo __('Date Added');?></a></th>
+            <th width="18%" nowrap><a  <?php echo $updated_sort; ?>href="filters.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated');?></a></th>
         </tr>
     </thead>
     <tbody>
@@ -101,7 +109,7 @@ else
                     $sel=true;
                 ?>
             <tr id="<?php echo $row['id']; ?>">
-                <td width=7px>
+                <td align="center">
                   <input type="checkbox" class="ckb" name="ids[]" value="<?php echo $row['id']; ?>"
                             <?php echo $sel?'checked="checked"':''; ?>>
                 </td>
diff --git a/include/staff/helptopic.inc.php b/include/staff/helptopic.inc.php
index bd3e28dc30b292f93b351293db76ba804b03d86b..2dd9db0ddd4ffbcf44867bc26fb1fa6a88c0bcaf 100644
--- a/include/staff/helptopic.inc.php
+++ b/include/staff/helptopic.inc.php
@@ -23,19 +23,16 @@ if($topic && $_REQUEST['a']!='add') {
 $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
 ?>
 
-<h2 style="font-weight: normal"><?php echo $title; ?>
-    &nbsp;<i class="help-tip icon-question-sign" href="#help_topic_information"></i>
-    </h2>
-<?php if ($topic) { ?>
-    <div class="big"><strong><?php echo $topic->getLocal('topic'); ?></strong></div>
+<h2><?php echo $title; ?>
+    <?php if (isset($info['topic'])) { ?><small>
+    — <?php echo $info['topic']; ?></small>
 <?php } ?>
-
-<br/>
+ <i class="help-tip icon-question-sign" href="#help_topic_information"></i></h2>
 
 <ul class="clean tabs" id="topic-tabs">
-    <li class="active"><a href="#info"><i class="icon-info-sign"></i> Help Topic Information</a></li>
-    <li><a href="#routing"><i class="icon-ticket"></i> New ticket options</a></li>
-    <li><a href="#forms"><i class="icon-paste"></i> Forms</a></li>
+    <li class="active"><a href="#info"><i class="icon-info-sign"></i> <?php echo __('Help Topic Information'); ?></a></li>
+    <li><a href="#routing"><i class="icon-ticket"></i> <?php echo __('New ticket options'); ?></a></li>
+    <li><a href="#forms"><i class="icon-paste"></i> <?php echo __('Forms'); ?></a></li>
 </ul>
 
 <form action="helptopics.php?<?php echo Http::build_query($qs); ?>" method="post" id="save">
@@ -101,7 +98,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
     </table>
 
         <div style="padding:8px 3px;border-bottom: 2px dotted #ddd;">
-            <strong class="big"><?php echo __('Internal Notes');?></strong><br/>
+            <strong><?php echo __('Internal Notes');?>:</strong>
             <?php echo __("be liberal, they're internal.");?>
         </div>
 
@@ -363,7 +360,7 @@ foreach ($forms as $F) {
                 <div><?php echo Format::display($F->getLocal('instructions')); ?></div>
             </td>
         </tr>
-        <tr>
+        <tr style="text-align:left">
             <th><?php echo __('Enable'); ?></th>
             <th><?php echo __('Label'); ?></th>
             <th><?php echo __('Type'); ?></th>
diff --git a/include/staff/helptopics.inc.php b/include/staff/helptopics.inc.php
index 9839cc76e81be16d03f4ada4112809d228dc8bf3..632716ca1c9703ad252f94750ba85d7d20d53b1d 100644
--- a/include/staff/helptopics.inc.php
+++ b/include/staff/helptopics.inc.php
@@ -12,46 +12,56 @@ $order_by = 'sort';
 
 ?>
 <form action="helptopics.php" method="POST" name="topics">
-
-<div class="pull-left" style="padding-top:5px;">
- <h2><?php echo __('Help Topics');?></h2>
- </div>
-<div class="pull-right flush-right" style="padding-top:5px;padding-right:5px;">
-    <?php if ($cfg->getTopicSortMode() != 'a') { ?>
-        <input class="button no-confirm" type="submit" name="sort" value="Save"/>
-    <?php } ?>
-    <a href="helptopics.php?a=add" class="green button action-button"><i class="icon-plus-sign"></i> <?php echo __('Add New Help Topic');?></a>
-
-    <span class="action-button" data-dropdown="#action-dropdown-more">
-       <i class="icon-caret-down pull-right"></i>
-        <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
-    </span>
-     <div id="action-dropdown-more" class="action-dropdown anchor-right">
-        <ul id="actions">
-          <li><a class="confirm" data-name="enable" href="helptopics.php?a=enable">
-            <i class="icon-ok-sign icon-fixed-width"></i>
-            <?php echo __('Enable'); ?></a></li>
-          <li><a class="confirm" data-name="disable" href="helptopics.php?a=disable">
-            <i class="icon-ban-circle icon-fixed-width"></i>
-            <?php echo __('Disable'); ?></a></li>
-          <li class="danger"><a class="confirm" data-name="delete" href="helptopics.php?a=delete">
-            <i class="icon-trash icon-fixed-width"></i>
-            <?php echo __('Delete'); ?></a></li>
-        </ul>
+    <div class="sticky bar opaque">
+        <div class="content">
+            <div class="pull-left flush-left">
+                <h2><?php echo __('Help Topics');?></h2>
+            </div>
+            <div class="pull-right flush-right">
+                <?php if ($cfg->getTopicSortMode() != 'a') { ?>
+                <button class="button no-confirm" type="submit" name="sort"><i class="icon-save"></i>
+                <?php echo __('Save'); ?></button>
+                <?php } ?>
+                <a href="helptopics.php?a=add" class="green button action-button"><i class="icon-plus-sign"></i> <?php echo __('Add New Help Topic');?></a>
+                <span class="action-button" data-dropdown="#action-dropdown-more">
+           <i class="icon-caret-down pull-right"></i>
+            <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
+                </span>
+                <div id="action-dropdown-more" class="action-dropdown anchor-right">
+                    <ul id="actions">
+                        <li>
+                            <a class="confirm" data-name="enable" href="helptopics.php?a=enable">
+                                <i class="icon-ok-sign icon-fixed-width"></i>
+                                <?php echo __( 'Enable'); ?>
+                            </a>
+                        </li>
+                        <li>
+                            <a class="confirm" data-name="disable" href="helptopics.php?a=disable">
+                                <i class="icon-ban-circle icon-fixed-width"></i>
+                                <?php echo __( 'Disable'); ?>
+                            </a>
+                        </li>
+                        <li class="danger">
+                            <a class="confirm" data-name="delete" href="helptopics.php?a=delete">
+                                <i class="icon-trash icon-fixed-width"></i>
+                                <?php echo __( 'Delete'); ?>
+                            </a>
+                        </li>
+                    </ul>
+                </div>
+            </div>
+        </div>
     </div>
-
-
-
-</div>
-<div class="clear"></div>
+    <div class="clear"></div>
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="mass_process" >
 <input type="hidden" id="action" name="a" value="sort" >
  <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
-    <caption><span class="pull-left" style="display:inline-block;vertical-align:middle"><?php
-         echo $showing; ?></span>
-         <div class="pull-right"><?php echo __('Sorting Mode'); ?>:
-        <select name="help_topic_sort_mode" onchange="javascript:
+
+    <thead>
+<tr><td colspan="7">
+    <div style="padding:3px" class="pull-right"><?php echo __('Sorting Mode'); ?>:
+    <select name="help_topic_sort_mode" onchange="javascript:
     var $form = $(this).closest('form');
     $form.find('input[name=a]').val('sort');
     $form.submit();
@@ -61,16 +71,15 @@ $order_by = 'sort';
         $i, $i == $cfg->getTopicSortMode() ? ' selected="selected"' : '', $m); ?>
         </select>
     </div>
-    </caption>
-    <thead>
+</td></tr>
         <tr>
-            <th width="7" style="height:20px;">&nbsp;</th>
-            <th style="padding-left:4px;vertical-align:middle" width="360"><?php echo __('Help Topic'); ?></th>
-            <th style="padding-left:4px;vertical-align:middle" width="80"><?php echo __('Status'); ?></th>
-            <th style="padding-left:4px;vertical-align:middle" width="100"><?php echo __('Type'); ?></th>
-            <th style="padding-left:4px;vertical-align:middle" width="100"><?php echo __('Priority'); ?></th>
-            <th style="padding-left:4px;vertical-align:middle" width="160"><?php echo __('Department'); ?></th>
-            <th style="padding-left:4px;vertical-align:middle" width="150" nowrap><?php echo __('Last Updated'); ?></th>
+            <th width="4%" style="height:20px;">&nbsp;</th>
+            <th style="padding-left:4px;vertical-align:middle" width="36%"><?php echo __('Help Topic'); ?></th>
+            <th style="padding-left:4px;vertical-align:middle" width="8%"><?php echo __('Status'); ?></th>
+            <th style="padding-left:4px;vertical-align:middle" width="8%"><?php echo __('Type'); ?></th>
+            <th style="padding-left:4px;vertical-align:middle" width="10%"><?php echo __('Priority'); ?></th>
+            <th style="padding-left:4px;vertical-align:middle" width="14%"><?php echo __('Department'); ?></th>
+            <th style="padding-left:4px;vertical-align:middle" width="20%" nowrap><?php echo __('Last Updated'); ?></th>
         </tr>
     </thead>
     <tbody class="<?php if ($cfg->getTopicSortMode() == 'm') echo 'sortable-rows'; ?>"
@@ -108,7 +117,7 @@ $order_by = 'sort';
                 $priority = $topic->priority ?: $defaultPriority;
                 ?>
             <tr id="<?php echo $id; ?>">
-                <td width=7px>
+                <td align="center">
                   <input type="hidden" name="sort-<?php echo $id; ?>" value="<?php
                         echo $topic->sort ?: $sort; ?>"/>
                   <input type="checkbox" class="ckb" name="ids[]"
@@ -118,7 +127,7 @@ $order_by = 'sort';
                 <td>
                     <?php
                     if ($cfg->getTopicSortMode() == 'm') { ?>
-                        <i class="icon-sort"></i>
+                        <i class="icon-sort faded"></i>
                     <?php } ?>
                     <a href="helptopics.php?id=<?php echo $id; ?>"><?php
                     echo Topic::getTopicName($id); ?></a>&nbsp;
diff --git a/include/staff/org-view.inc.php b/include/staff/org-view.inc.php
index 6c50d048f6876da6fb914be91ca250e6bce61947..1c20cb92a07e9b172565a9334eb9d695beb1b445 100644
--- a/include/staff/org-view.inc.php
+++ b/include/staff/org-view.inc.php
@@ -9,16 +9,16 @@ if(!defined('OSTSCPINC') || !$thisstaff || !is_object($org)) die('Invalid path')
              title="Reload"><i class="icon-refresh"></i> <?php echo $org->getName(); ?></a></h2>
         </td>
         <td width="50%" class="right_align has_bottom_border">
+<?php if ($thisstaff->hasPerm(Organization::PERM_DELETE)) { ?>
+            <a id="org-delete" class="red button action-button org-action"
+            href="#orgs/<?php echo $org->getId(); ?>/delete"><i class="icon-trash"></i>
+            <?php echo __('Delete Organization'); ?></a>
+<?php } ?>
 <?php if ($thisstaff->hasPerm(Organization::PERM_EDIT)) { ?>
-            <span class="action-button pull-right" data-dropdown="#action-dropdown-more">
+            <span class="action-button" data-dropdown="#action-dropdown-more">
                 <i class="icon-caret-down pull-right"></i>
                 <span ><i class="icon-cog"></i> <?php echo __('More'); ?></span>
             </span>
-<?php } ?>
-<?php if ($thisstaff->hasPerm(Organization::PERM_DELETE)) { ?>
-            <a id="org-delete" class="red button action-button pull-right org-action"
-            href="#orgs/<?php echo $org->getId(); ?>/delete"><i class="icon-trash"></i>
-            <?php echo __('Delete Organization'); ?></a>
 <?php } ?>
             <div id="action-dropdown-more" class="action-dropdown anchor-right">
               <ul>
diff --git a/include/staff/orgs.inc.php b/include/staff/orgs.inc.php
index 969540cdce2d2cdfa48a6bf7b83f744107a4f279..aba6ed30869ee4c56f2fe3b4399324c406135ae3 100644
--- a/include/staff/orgs.inc.php
+++ b/include/staff/orgs.inc.php
@@ -71,47 +71,52 @@ $query="$select $from $where GROUP BY org.id ORDER BY $order_by LIMIT ".$pageNav
 $qhash = md5($query);
 $_SESSION['orgs_qs_'.$qhash] = $query;
 ?>
-<h2><?php echo __('Organizations'); ?></h2>
-<div class="pull-left">
-    <form action="orgs.php" method="get">
-        <?php csrf_token(); ?>
-        <input type="hidden" name="a" value="search">
-        <table>
-            <tr>
-                <td><input type="search" id="basic-org-search" name="query"
-                    autofocus size="30" value="<?php echo Format::htmlchars($_REQUEST['query']); ?>"
-                    autocomplete="off" autocorrect="off" autocapitalize="off"></td>
-                <td><input type="submit" name="basic_search" class="button" value="<?php echo __('Search'); ?>"></td>
-                <!-- <td>&nbsp;&nbsp;<a href="" id="advanced-user-search">[advanced]</a></td> -->
-            </tr>
-        </table>
-    </form>
- </div>
-
-<div class="pull-right">
-<?php if ($thisstaff->hasPerm(Organization::PERM_CREATE)) { ?>
-    <a class="green button action-button add-org"
-        href="#">
-        <i class="icon-plus-sign"></i>
-        <?php echo __('Add Organization'); ?>
-    </a>
-<?php }
-if ($thisstaff->hasPerm(Organization::PERM_DELETE)) { ?>
-    <span class="action-button" data-dropdown="#action-dropdown-more"
-        style="/*DELME*/ vertical-align:top; margin-bottom:0">
-        <i class="icon-caret-down pull-right"></i>
-        <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
-    </span>
-    <div id="action-dropdown-more" class="action-dropdown anchor-right">
-        <ul>
-            <li class="danger"><a class="orgs-action" href="#delete">
-                <i class="icon-trash icon-fixed-width"></i>
-                <?php echo __('Delete'); ?></a></li>
-        </ul>
+<div id="basic_search">
+    <div style="min-height:25px;">
+        <form action="orgs.php" method="get">
+            <?php csrf_token(); ?>
+            <div class="attached input">
+            <input type="hidden" name="a" value="search">
+            <input type="search" class="basic-search" id="basic-org-search" name="query" autofocus size="30" value="<?php echo Format::htmlchars($_REQUEST['query']); ?>" autocomplete="off" autocorrect="off" autocapitalize="off">
+                <button type="submit" class="attached button"><i class="icon-search"></i>
+                </button>
+            <!-- <td>&nbsp;&nbsp;<a href="" id="advanced-user-search">[advanced]</a></td> -->
+            </div>
+        </form>
+    </div>
+</div>
+<div style="margin-bottom:20px; padding-top:5px;">
+    <div class="sticky bar opaque">
+        <div class="content">
+            <div class="pull-left flush-left">
+                <h2><?php echo __('Organizations'); ?></h2>
+            </div>
+            <div class="pull-right">
+                <?php if ($thisstaff->hasPerm(Organization::PERM_CREATE)) { ?>
+                <a class="green button action-button add-org"
+                   href="#">
+                    <i class="icon-plus-sign"></i>
+                    <?php echo __('Add Organization'); ?>
+                </a>
+                <?php }
+            if ($thisstaff->hasPerm(Organization::PERM_DELETE)) { ?>
+                <span class="action-button" data-dropdown="#action-dropdown-more"
+                      style="/*DELME*/ vertical-align:top; margin-bottom:0">
+                    <i class="icon-caret-down pull-right"></i>
+                    <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
+                </span>
+                <div id="action-dropdown-more" class="action-dropdown anchor-right">
+                    <ul>
+                        <li class="danger"><a class="orgs-action" href="#delete">
+                            <i class="icon-trash icon-fixed-width"></i>
+                            <?php echo __('Delete'); ?></a></li>
+                    </ul>
+                </div>
+                <?php } ?>
+            </div>
+        </div>
     </div>
-<?php } ?>
 </div>
-
 <div class="clear"></div>
 <?php
 $showing = $search ? __('Search Results').': ' : '';
@@ -127,14 +132,13 @@ else
  <input type="hidden" id="action" name="do" value="" >
  <input type="hidden" id="selected-count" name="count" value="" >
  <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
-    <caption><?php echo $showing; ?></caption>
     <thead>
         <tr>
-            <th nowrap width="12"> </th>
-            <th width="400"><a <?php echo $name_sort; ?> href="orgs.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name'); ?></a></th>
-            <th width="100"><a <?php echo $users_sort; ?> href="orgs.php?<?php echo $qstr; ?>&sort=users"><?php echo __('Users'); ?></a></th>
-            <th width="150"><a <?php echo $create_sort; ?> href="orgs.php?<?php echo $qstr; ?>&sort=create"><?php echo __('Created'); ?></a></th>
-            <th width="145"><a <?php echo $update_sort; ?> href="orgs.php?<?php echo $qstr; ?>&sort=update"><?php echo __('Last Updated'); ?></a></th>
+            <th nowrap width="4%">&nbsp;</th>
+            <th width="45%"><a <?php echo $name_sort; ?> href="orgs.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name'); ?></a></th>
+            <th width="11%"><a <?php echo $users_sort; ?> href="orgs.php?<?php echo $qstr; ?>&sort=users"><?php echo __('Users'); ?></a></th>
+            <th width="20%"><a <?php echo $create_sort; ?> href="orgs.php?<?php echo $qstr; ?>&sort=create"><?php echo __('Created'); ?></a></th>
+            <th width="20%"><a <?php echo $update_sort; ?> href="orgs.php?<?php echo $qstr; ?>&sort=update"><?php echo __('Last Updated'); ?></a></th>
         </tr>
     </thead>
     <tbody>
@@ -148,7 +152,7 @@ else
                     $sel=true;
                 ?>
                <tr id="<?php echo $row['id']; ?>">
-                <td nowrap>
+                <td nowrap align="center">
                     <input type="checkbox" value="<?php echo $row['id']; ?>" class="ckb mass nowarn"/>
                 </td>
                 <td>&nbsp; <a href="orgs.php?id=<?php echo $row['id']; ?>"><?php echo $row['name']; ?></a> </td>
diff --git a/include/staff/page.inc.php b/include/staff/page.inc.php
index 1a959a4c8a3c50f0f03efc507db103266b641add..609066f86220513ec1d1bbf03e1025c94c70bfae 100644
--- a/include/staff/page.inc.php
+++ b/include/staff/page.inc.php
@@ -42,15 +42,17 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
  <input type="hidden" name="id" value="<?php echo $info['id']; ?>">
- <h2><?php echo __('Site Pages'); ?>
+ <h2><?php echo $title; ?>
+    <?php if (isset($info['name'])) { ?><small>
+    — <?php echo $info['name']; ?></small>
+     <?php } ?>
     <i class="help-tip icon-question-sign" href="#site_pages"></i>
     </h2>
  <table class="form_table fixed" width="940" border="0" cellspacing="0" cellpadding="2">
     <thead>
-        <tr><td></td><td></td></tr> <!-- For fixed table layout -->
+        <tr><td style="padding:0"></td><td style="padding:0;"></td></tr> <!-- For fixed table layout -->
         <tr>
             <th colspan="2">
-                <h4><?php echo $title; ?></h4>
                 <em><?php echo __('Page information'); ?></em>
             </th>
         </tr>
@@ -188,7 +190,7 @@ else
         </tr>
     </tbody>
 </table>
-<p style="padding-left:225px;">
+<p style="text-align:center">
     <input type="submit" name="submit" value="<?php echo $submit_text; ?>">
     <input type="reset"  name="reset"  value="<?php echo __('Reset'); ?>">
     <input type="button" name="cancel" value="<?php echo __('Cancel'); ?>" onclick='window.location.href="pages.php"'>
diff --git a/include/staff/pages.inc.php b/include/staff/pages.inc.php
index 543b6bb78209c770784622ccce33d37b73a487d7..76f7a4c3a1ff048e4f2925578d3c0dd9b38db554 100644
--- a/include/staff/pages.inc.php
+++ b/include/staff/pages.inc.php
@@ -37,48 +37,58 @@ else
 
 ?>
 <form action="pages.php" method="POST" name="tpls">
-
-<div class="pull-left" style="padding-top:5px;">
- <h2><?php echo __('Site Pages'); ?>
-    <i class="help-tip icon-question-sign" href="#site_pages"></i>
-    </h2>
-</div>
-<div class="pull-right flush-right" style="padding-top:5px;padding-right:5px;">
-    <a href="pages.php?a=add" class="green button action-button"><i class="icon-plus-sign"></i> <?php echo __('Add New Page'); ?></a>
-
-    <span class="action-button" data-dropdown="#action-dropdown-more">
-       <i class="icon-caret-down pull-right"></i>
-        <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
-    </span>
-     <div id="action-dropdown-more" class="action-dropdown anchor-right">
-        <ul id="actions">
-          <li><a class="confirm" data-name="enable" href="pages.php?a=enable">
-            <i class="icon-ok-sign icon-fixed-width"></i>
-            <?php echo __('Enable'); ?></a></li>
-          <li><a class="confirm" data-name="disable" href="pages.php?a=disable">
-            <i class="icon-ban-circle icon-fixed-width"></i>
-            <?php echo __('Disable'); ?></a></li>
-          <li class="danger"><a class="confirm" data-name="delete" href="pages.php?a=delete">
-            <i class="icon-trash icon-fixed-width"></i>
-            <?php echo __('Delete'); ?></a></li>
-        </ul>
+    <div class="sticky bar opaque">
+        <div class="content">
+            <div class="pull-left flush-left">
+                <h2><?php echo __('Site Pages'); ?>
+        <i class="help-tip icon-question-sign notsticky" href="#site_pages"></i>
+        </h2>
+            </div>
+            <div class="pull-right flush-right">
+                <a href="pages.php?a=add" class="green button action-button"><i class="icon-plus-sign"></i> <?php echo __('Add New Page'); ?></a>
+                <span class="action-button" data-dropdown="#action-dropdown-more">
+           <i class="icon-caret-down pull-right"></i>
+            <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
+                </span>
+                <div id="action-dropdown-more" class="action-dropdown anchor-right">
+                    <ul id="actions">
+                        <li>
+                            <a class="confirm" data-name="enable" href="pages.php?a=enable">
+                                <i class="icon-ok-sign icon-fixed-width"></i>
+                                <?php echo __( 'Enable'); ?>
+                            </a>
+                        </li>
+                        <li>
+                            <a class="confirm" data-name="disable" href="pages.php?a=disable">
+                                <i class="icon-ban-circle icon-fixed-width"></i>
+                                <?php echo __( 'Disable'); ?>
+                            </a>
+                        </li>
+                        <li class="danger">
+                            <a class="confirm" data-name="delete" href="pages.php?a=delete">
+                                <i class="icon-trash icon-fixed-width"></i>
+                                <?php echo __( 'Delete'); ?>
+                            </a>
+                        </li>
+                    </ul>
+                </div>
+            </div>
+        </div>
     </div>
-</div>
-<div class="clear"></div>
+    <div class="clear"></div>
 <form action="pages.php" method="POST" name="tpls">
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="mass_process" >
 <input type="hidden" id="action" name="a" value="" >
  <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
-    <caption><?php echo $showing; ?></caption>
     <thead>
         <tr>
-            <th width="7">&nbsp;</th>
-            <th width="300"><a <?php echo $name_sort; ?> href="pages.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name'); ?></a></th>
-            <th width="90"><a  <?php echo $type_sort; ?> href="pages.php?<?php echo $qstr; ?>&sort=type"><?php echo __('Type'); ?></a></th>
-            <th width="110"><a  <?php echo $status_sort; ?> href="pages.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Status'); ?></a></th>
-            <th width="150" nowrap><a  <?php echo $created_sort; ?>href="pages.php?<?php echo $qstr; ?>&sort=created"><?php echo __('Date Added'); ?></a></th>
-            <th width="150" nowrap><a  <?php echo $updated_sort; ?>href="pages.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated'); ?></a></th>
+            <th width="4%">&nbsp;</th>
+            <th width="35%"><a <?php echo $name_sort; ?> href="pages.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name'); ?></a></th>
+            <th width="10%"><a  <?php echo $type_sort; ?> href="pages.php?<?php echo $qstr; ?>&sort=type"><?php echo __('Type'); ?></a></th>
+            <th width="16%"><a  <?php echo $status_sort; ?> href="pages.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Status'); ?></a></th>
+            <th width="15%" nowrap><a  <?php echo $created_sort; ?>href="pages.php?<?php echo $qstr; ?>&sort=created"><?php echo __('Date Added'); ?></a></th>
+            <th width="20%" nowrap><a  <?php echo $updated_sort; ?>href="pages.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated'); ?></a></th>
         </tr>
     </thead>
     <tbody>
@@ -92,7 +102,7 @@ else
                 $inuse = ($page->topics || in_array($page->id, $defaultPages));
                 ?>
             <tr id="<?php echo $page->id; ?>">
-                <td width=7px>
+                <td align="center">
                   <input type="checkbox" class="ckb" name="ids[]" value="<?php echo $page->id; ?>"
                             <?php echo $sel?'checked="checked"':''; ?>>
                 </td>
diff --git a/include/staff/plugin-add.inc.php b/include/staff/plugin-add.inc.php
index a5aae19d0581e1dce739ef3d05096f7d49028016..ac4bfb375497fa3499cc131f49cb8af92fb3e6c7 100644
--- a/include/staff/plugin-add.inc.php
+++ b/include/staff/plugin-add.inc.php
@@ -17,7 +17,7 @@ foreach ($ost->plugins->allInfos() as $info) {
     if (isset($installed[$info['install_path']]))
         continue;
     ?>
-        <tr><td><button type="submit" name="install_path"
+        <tr><td><button class="button action-button" type="submit" name="install_path"
             value="<?php echo $info['install_path'];
             ?>"><?php echo __('Install'); ?></button></td>
         <td>
diff --git a/include/staff/plugin.inc.php b/include/staff/plugin.inc.php
index 65c8f5863c5895590b27ec0ed026f55238b51b66..58d4a0313d852d26a59ac040b8be6b536870f2ba 100644
--- a/include/staff/plugin.inc.php
+++ b/include/staff/plugin.inc.php
@@ -23,7 +23,7 @@ $info = Format::htmlchars(($errors && $_POST) ? $_POST : $info);
     <input type="hidden" name="do" value="<?php echo $action; ?>">
     <input type="hidden" name="id" value="<?php echo $info['id']; ?>">
     <h2><?php echo __('Manage Plugin'); ?>
-        <small><?php echo $plugin->getName(); ?></small></h2>
+       — <small><?php echo $plugin->getName(); ?></small></h2>
 
     <h3><?php echo __('Configuration'); ?></h3>
 <?php
diff --git a/include/staff/plugins.inc.php b/include/staff/plugins.inc.php
index bbb25bd04bfef47ff1b280e62a98c8e0026039f2..7f210246b55ec349fbd3c75c9c315d1c50cc46b1 100644
--- a/include/staff/plugins.inc.php
+++ b/include/staff/plugins.inc.php
@@ -1,28 +1,40 @@
 <form action="plugins.php" method="POST" name="forms">
 
-    <div class="pull-left" style="padding-top:5px;">
- <h2><?php echo __('Currently Installed Plugins'); ?></h2>
-</div>
-<div class="pull-right flush-right" style="padding-top:5px;padding-right:5px;">
-    <a href="plugins.php?a=add" class="green button action-button"><i class="icon-plus-sign"></i> <?php
- echo __('Add New Plugin'); ?></a>
-
-    <span class="action-button" data-dropdown="#action-dropdown-more">
-       <i class="icon-caret-down pull-right"></i>
-        <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
-    </span>
-     <div id="action-dropdown-more" class="action-dropdown anchor-right">
-        <ul id="actions">
-          <li><a class="confirm" data-name="enable" href="plugins.php?a=enable">
-            <i class="icon-ok-sign icon-fixed-width"></i>
-            <?php echo __('Enable'); ?></a></li>
-          <li><a class="confirm" data-name="disable" href="plugins.php?a=disable">
-            <i class="icon-ban-circle icon-fixed-width"></i>
-            <?php echo __('Disable'); ?></a></li>
-          <li class="danger"><a class="confirm" data-name="delete" href="plugins.php?a=delete">
-            <i class="icon-trash icon-fixed-width"></i>
-            <?php echo __('Delete'); ?></a></li>
-        </ul>
+<div class="sticky bar opaque">
+    <div class="content">
+        <div class="pull-left flush-left">
+            <h2><?php echo __('Currently Installed Plugins'); ?></h2>
+        </div>
+        <div class="pull-right flush-right">
+            <a href="plugins.php?a=add" class="green button action-button"><i class="icon-plus-sign"></i> <?php
+                echo __('Add New Plugin'); ?></a>
+            <span class="action-button" data-dropdown="#action-dropdown-more">
+                <i class="icon-caret-down pull-right"></i>
+                <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
+            </span>
+            <div id="action-dropdown-more" class="action-dropdown anchor-right">
+                <ul id="actions">
+                    <li>
+                        <a class="confirm" data-name="enable" href="plugins.php?a=enable">
+                            <i class="icon-ok-sign icon-fixed-width"></i>
+                            <?php echo __( 'Enable'); ?>
+                        </a>
+                    </li>
+                    <li>
+                        <a class="confirm" data-name="disable" href="plugins.php?a=disable">
+                            <i class="icon-ban-circle icon-fixed-width"></i>
+                            <?php echo __( 'Disable'); ?>
+                        </a>
+                    </li>
+                    <li class="danger">
+                        <a class="confirm" data-name="delete" href="plugins.php?a=delete">
+                            <i class="icon-trash icon-fixed-width"></i>
+                            <?php echo __( 'Delete'); ?>
+                        </a>
+                    </li>
+                </ul>
+            </div>
+        </div>
     </div>
 </div>
 <div class="clear"></div>
@@ -42,10 +54,10 @@ $showing=$pageNav->showing().' '._N('plugin', 'plugins', $count);
 <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
     <thead>
         <tr>
-            <th width="7">&nbsp;</th>
-            <th><?php echo __('Plugin Name'); ?></th>
-            <th><?php echo __('Status'); ?></th>
-            <th><?php echo __('Date Installed'); ?></th>
+            <th width="4%">&nbsp;</th>
+            <th width="66%"><?php echo __('Plugin Name'); ?></th>
+            <th width="10%"><?php echo __('Status'); ?></th>
+            <th width="20%"><?php echo __('Date Installed'); ?></th>
         </tr>
     </thead>
     <tbody>
@@ -53,7 +65,7 @@ $showing=$pageNav->showing().' '._N('plugin', 'plugins', $count);
 foreach ($ost->plugins->allInstalled() as $p) {
     if ($p instanceof Plugin) { ?>
     <tr>
-        <td><input type="checkbox" class="ckb" name="ids[]" value="<?php echo $p->getId(); ?>"
+        <td align="center"><input type="checkbox" class="ckb" name="ids[]" value="<?php echo $p->getId(); ?>"
                 <?php echo $sel?'checked="checked"':''; ?>></td>
         <td><a href="plugins.php?id=<?php echo $p->getId(); ?>"
             ><?php echo $p->getName(); ?></a></td>
diff --git a/include/staff/profile.inc.php b/include/staff/profile.inc.php
index 6fc6a2c75bfec9247f09599b1ee89f79681a2a60..a41e31304dc72a3ecbc732e7dba3e9bb59bb02f6 100644
--- a/include/staff/profile.inc.php
+++ b/include/staff/profile.inc.php
@@ -6,8 +6,7 @@ if(!defined('OSTSTAFFINC') || !$staff || !$thisstaff) die('Access Denied');
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="update">
  <input type="hidden" name="id" value="<?php echo $staff->getId(); ?>">
- <h2><?php echo __('My Account Profile');?></h2>
-
+<h2><?php echo __('My Account Profile');?></h2>
   <ul class="clean tabs">
     <li class="active"><a href="#account"><i class="icon-user"></i> <?php echo __('Account'); ?></a></li>
     <li><a href="#preferences"><?php echo __('Preferences'); ?></a></li>
@@ -314,10 +313,12 @@ if ($avatar->isChangeable()) { ?>
   </div>
 
   <p style="text-align:center;">
-      <input type="submit" name="submit" value="<?php echo __('Save Changes'); ?>">
-      <input type="reset"  name="reset"  value="<?php echo __('Reset');?>">
-      <input type="button" name="cancel" value="<?php echo __('Cancel');?>" onclick="window.history.go(-1);">
+    <button class="button action-button" type="submit" name="submit" ><i class="icon-save"></i> <?php echo __('Save Changes'); ?></button>
+    <button class="button action-button" type="reset"  name="reset"><i class="icon-undo"></i>
+        <?php echo __('Reset');?></button>
+    <button class="red button action-button" type="button" name="cancel" onclick="window.history.go(-1);"><i class="icon-remove-circle"></i> <?php echo __('Cancel');?></button>
   </p>
+    <div class="clear"></div>
 </form>
 <?php
 if ($staff->change_passwd) { ?>
diff --git a/include/staff/role.inc.php b/include/staff/role.inc.php
index de2eecb2ba4583b396b2c8bd324f424d8baff2f9..9d82a8a318275582b0d1cf281c7ecd47242321a6 100644
--- a/include/staff/role.inc.php
+++ b/include/staff/role.inc.php
@@ -23,105 +23,104 @@ $info = Format::htmlchars(($errors && $_POST) ? array_merge($info, $_POST) : $in
     <input type="hidden" name="do" value="<?php echo $action; ?>">
     <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
     <input type="hidden" name="id" value="<?php echo $info['id']; ?>">
-<h2> <?php echo $role ?: __('New Role'); ?></h2>
-<ul class="clean tabs">
-    <li class="active"><a href="#definition">
-        <i class="icon-file"></i> <?php echo __('Definition'); ?></a></li>
-    <li><a href="#permissions">
-        <i class="icon-lock"></i> <?php echo __('Permissions'); ?></a></li>
-</ul>
-<div id="definition" class="tab_content">
-    <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
-    <thead>
-        <tr>
-            <th colspan="2">
-                <h4><?php echo $title; ?></h4>
-                <em><?php echo __(
-                'Roles are used to define agents\' permissions'
-                ); ?>&nbsp;<i class="help-tip icon-question-sign"
-                href="#roles"></i></em>
-            </th>
-        </tr>
-    </thead>
-    <tbody>
-        <tr>
-            <td width="180" class="required"><?php echo __('Name'); ?>:</td>
-            <td>
-                <input size="50" type="text" name="name" value="<?php echo
-                $info['name']; ?>" data-translate-tag="<?php echo $trans['name']; ?>"
-                autofocus/>
-                <span class="error">*&nbsp;<?php echo $errors['name']; ?></span>
-            </td>
-        </tr>
-    </tbody>
-    <tbody>
-        <tr>
-            <th colspan="7">
-                <em><strong><?php echo __('Internal Notes'); ?></strong> </em>
-            </th>
-        </tr>
-        <tr>
-            <td colspan="7"><textarea name="notes" class="richtext no-bar"
-                rows="6" cols="80"><?php
-                echo $info['notes']; ?></textarea>
-            </td>
-        </tr>
-    </tbody>
-    </table>
-</div>
-<div id="permissions" class="tab_content" style="display:none">
-   <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
-    <thead>
-        <tr>
-            <th>
-                <em><?php echo __('Check all permissions applicable to this role.') ?></em>
-            </th>
-        </tr>
-    </thead>
-    <tbody>
+    <h2><?php echo $title; ?>
+    <?php if (isset($info['name'])) { ?><small>
+    — <?php echo $info['name']; ?></small>
+        <?php } ?>
+    </h2>
+    <ul class="clean tabs">
+        <li class="active"><a href="#definition"><i class="icon-file"></i> <?php echo __('Definition'); ?></a></li>
+        <li><a href="#permissions"><i class="icon-lock"></i> <?php echo __('Permissions'); ?></a></li>
+    </ul>
+    <div id="definition" class="tab_content">
+        <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
+            <thead>
+                <tr>
+                    <th colspan="2">
+                        <em><?php echo __(
+                        'Roles are used to define agents\' permissions'
+                        ); ?>&nbsp;<i class="help-tip icon-question-sign"
+                        href="#roles"></i></em>
+                    </th>
+                </tr>
+            </thead>
+            <tbody>
+                <tr>
+                    <td width="180" class="required"><?php echo __('Name'); ?>:</td>
+                    <td>
+                        <input size="50" type="text" name="name" value="<?php echo
+                        $info['name']; ?>" data-translate-tag="<?php echo $trans['name']; ?>"
+                        autofocus/>
+                        <span class="error">*&nbsp;<?php echo $errors['name']; ?></span>
+                    </td>
+                </tr>
+            </tbody>
+            <tbody>
+                <tr>
+                    <th colspan="7">
+                        <em><strong><?php echo __('Internal Notes'); ?></strong> </em>
+                    </th>
+                </tr>
+                <tr>
+                    <td colspan="7"><textarea name="notes" class="richtext no-bar"
+                        rows="6" cols="80"><?php
+                        echo $info['notes']; ?></textarea>
+                    </td>
+                </tr>
+            </tbody>
+        </table>
+    </div>
+    <div id="permissions" class="hidden">
         <?php
-        $setting = $role ? $role->getPermissionInfo() : array();
-
-        // Eliminate groups without any department-specific permissions
-        $buckets = array();
-        foreach (RolePermission::allPermissions() as $g => $perms) {
-            foreach ($perms as $k => $v) {
+            $setting = $role ? $role->getPermissionInfo() : array();
+            // Eliminate groups without any department-specific permissions
+            $buckets = array();
+            foreach (RolePermission::allPermissions() as $g => $perms) {
+                foreach ($perms as $k => $v) {
                 if ($v['primary'])
                     continue;
-                $buckets[$g][$k] = $v;
+                    $buckets[$g][$k] = $v;
             }
-        }
-        foreach ($buckets as $g => $perms) { ?>
-        <tr><th><?php
-             echo Format::htmlchars(__($g)); ?></th></tr>
-<?php
-          foreach ($perms as $k => $v) { ?>
-          <tr>
-            <td>
-              <label>
-              <?php
-              echo sprintf('<input type="checkbox" name="perms[]" value="%s" %s />',
-                    $k,
-                    (isset($setting[$k]) && $setting[$k]) ?  'checked="checked"' : '');
-              ?>
-              &nbsp;&nbsp;
-              <?php echo Format::htmlchars(__($v['title'])); ?>
-              —
-              <em><?php echo Format::htmlchars(__($v['desc']));
-              ?></em>
-             </label>
-            </td>
-          </tr>
-          <?php
-         }
         } ?>
-    </tbody>
-   </table>
-</div>
-<p class="centered">
-    <input type="submit" name="submit" value="<?php echo $submit_text; ?>">
-    <input type="reset"  name="reset"  value="<?php echo __('Reset'); ?>">
-    <input type="button" name="cancel" value="<?php echo __('Cancel'); ?>"
-        onclick='window.location.href="?"'>
-</p>
+        <ul class="alt tabs">
+            <?php
+                $first = true;
+                foreach ($buckets as $g => $perms) { ?>
+                    <li <?php if ($first) { echo 'class="active"'; $first=false; } ?>>
+                        <a href="#<?php echo Format::slugify($g); ?>"><?php echo Format::htmlchars(__($g));?></a>
+                    </li>
+            <?php } ?>
+        </ul>
+        <?php
+        $first = true;
+        foreach ($buckets as $g => $perms) { ?>
+        <div class="tab_content <?php if (!$first) { echo 'hidden'; } else { $first = false; }
+            ?>" id="<?php echo Format::slugify($g); ?>">
+            <table class="table">
+                <?php foreach ($perms as $k => $v) { ?>
+                <tr>
+                    <td>
+                        <label>
+                            <?php
+                            echo sprintf('<input type="checkbox" name="perms[]" value="%s" %s />',
+                            $k, (isset($setting[$k]) && $setting[$k]) ?  'checked="checked"' : ''); ?>
+                            &nbsp;
+                            <?php echo Format::htmlchars(__($v['title'])); ?>
+                            —
+                            <em><?php echo Format::htmlchars(__($v['desc']));
+                            ?></em>
+                        </label>
+                    </td>
+                </tr>
+                <?php } ?>
+            </table>
+        </div>
+        <?php } ?>
+    </div>
+    <p class="centered">
+        <input type="submit" name="submit" value="<?php echo $submit_text; ?>">
+        <input type="reset"  name="reset"  value="<?php echo __('Reset'); ?>">
+        <input type="button" name="cancel" value="<?php echo __('Cancel'); ?>"
+            onclick='window.location.href="?"'>
+    </p>
 </form>
diff --git a/include/staff/roles.inc.php b/include/staff/roles.inc.php
index c568616c6f44312796172f9349bd5437d77d13e2..7ce374cfe96bad198bbfe74061be44c0105d93c9 100644
--- a/include/staff/roles.inc.php
+++ b/include/staff/roles.inc.php
@@ -39,14 +39,13 @@ csrf_token(); ?>
 <input type="hidden" name="do" value="mass_process" >
 <input type="hidden" id="action" name="a" value="" >
 <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
-    <caption><?php echo $showing; ?></caption>
     <thead>
         <tr>
-            <th width="7">&nbsp;</th>
-            <th><?php echo __('Name'); ?></th>
-            <th width="100"><?php echo __('Status'); ?></th>
-            <th width="200"><?php echo __('Created On') ?></th>
-            <th width="250"><?php echo __('Last Updated'); ?></th>
+            <th width="4%">&nbsp;</th>
+            <th width="53%"><?php echo __('Name'); ?></th>
+            <th width="8%"><?php echo __('Status'); ?></th>
+            <th width="15%"><?php echo __('Created On') ?></th>
+            <th width="20%"><?php echo __('Last Updated'); ?></th>
         </tr>
     </thead>
     <tbody>
@@ -58,7 +57,7 @@ csrf_token(); ?>
             if ($ids && in_array($id, $ids))
                 $sel = true; ?>
         <tr>
-            <td>
+            <td align="center">
                 <?php
                 if ($role->isDeleteable()) { ?>
                 <input width="7" type="checkbox" class="ckb" name="ids[]"
diff --git a/include/staff/settings-agents.inc.php b/include/staff/settings-agents.inc.php
index 5a7e83230a6a6aaef958b77f6b7780684b477c3c..e5ca64b320ce14ec1f601dd4db4e55583092d96c 100644
--- a/include/staff/settings-agents.inc.php
+++ b/include/staff/settings-agents.inc.php
@@ -4,182 +4,198 @@ if (!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config
 ?>
 <h2><?php echo __('Agents Settings'); ?></h2>
 <form action="settings.php?t=agents" method="post" id="save">
-<?php csrf_token(); ?>
-<input type="hidden" name="t" value="agents" >
-<ul class="tabs" id="agents-tabs">
-    <li class="active"><a href="#settings">
-        <i class="icon-asterisk"></i> <?php echo __('Settings'); ?></a></li>
-    <li><a href="#templates">
-        <i class="icon-file-text"></i> <?php echo __('Templates'); ?></a></li>
-</ul>
-<div id="agents-tabs_container">
-   <div id="settings" class="tab_content">
-<table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2">
-    <tbody>
-        <tr>
-            <th colspan="2">
-                <em><b><?php echo __('General Settings'); ?></b></em>
-            </th>
-        </tr>
-        <tr>
-            <td width="180"><?php echo __('Name Formatting'); ?>:</td>
-            <td>
-                <select name="agent_name_format">
-                <?php foreach (PersonsName::allFormats() as $n=>$f) {
-                    list($desc, $func) = $f;
-                    $selected = ($config['agent_name_format'] == $n) ? 'selected="selected"' : ''; ?>
-                                    <option value="<?php echo $n; ?>" <?php echo $selected;
-                                        ?>><?php echo __($desc); ?></option>
-                <?php } ?>
-                </select>
-                <i class="help-tip icon-question-sign" href="#agent_name_format"></i>
-            </td>
-        </tr>
-        <tr>
-            <td width="180"><?php echo __('Avatar Source'); ?>:</td>
-            <td>
-                <select name="agent_avatar">
-<?php           require_once INCLUDE_DIR . 'class.avatar.php';
-                foreach (AvatarSource::allSources() as $id=>$class) {
-                    $modes = $class::getModes();
-                    if ($modes) {
-                        echo "<optgroup label=\"{$class::getName()}\">";
-                        foreach ($modes as $mid=>$mname) {
-                            $oid = "$id.$mid";
-                            $selected = ($config['agent_avatar'] == $oid) ? 'selected="selected"' : '';
-                            echo "<option {$selected} value=\"{$oid}\">{$class::getName()} / {$mname}</option>";
-                        }
-                        echo "</optgroup>";
-                    }
-                    else {
-                        $selected = ($config['agent_avatar'] == $id) ? 'selected="selected"' : '';
-                        echo "<option {$selected} value=\"{$id}\">{$class::getName()}</option>";
-                    }
-                } ?>
-                </select>
-                <div class="error"><?php echo Format::htmlchars($errors['agent_avatar']); ?></div>
-            </td>
-        </tr>
-        <tr>
-            <th colspan="2">
-                <em><b><?php echo __('Authentication Settings'); ?></b></em>
-            </th>
-        </tr>
-        <tr><td><?php echo __('Password Expiration Policy'); ?>:</th>
-            <td>
-                <select name="passwd_reset_period">
-                   <option value="0"> &mdash; <?php echo __('No expiration'); ?> &mdash;</option>
-                  <?php
-                    for ($i = 1; $i <= 12; $i++) {
-                        echo sprintf('<option value="%d" %s>%s</option>',
-                                $i,(($config['passwd_reset_period']==$i)?'selected="selected"':''),
-                                sprintf(_N('Monthly', 'Every %d months', $i), $i));
-                    }
-                    ?>
-                </select>
-                <font class="error"><?php echo $errors['passwd_reset_period']; ?></font>
-                <i class="help-tip icon-question-sign" href="#password_expiration_policy"></i>
-            </td>
-        </tr>
-        <tr><td><?php echo __('Allow Password Resets'); ?>:</th>
-            <td>
-              <input type="checkbox" name="allow_pw_reset" <?php echo $config['allow_pw_reset']?'checked="checked"':''; ?>>
-              &nbsp;<i class="help-tip icon-question-sign" href="#allow_password_resets"></i>
-            </td>
-        </tr>
-        <tr><td><?php echo __('Reset Token Expiration'); ?>:</th>
-            <td>
-              <input type="text" name="pw_reset_window" size="6" value="<?php
-                    echo $config['pw_reset_window']; ?>">
-                    <em><?php echo __('minutes'); ?></em>
-                    <i class="help-tip icon-question-sign" href="#reset_token_expiration"></i>
-                &nbsp;<font class="error"><?php echo $errors['pw_reset_window']; ?></font>
-            </td>
-        </tr>
-        <tr><td><?php echo __('Agent Excessive Logins'); ?>:</td>
-            <td>
-                <select name="staff_max_logins">
-                  <?php
-                    for ($i = 1; $i <= 10; $i++) {
-                        echo sprintf('<option value="%d" %s>%d</option>', $i,(($config['staff_max_logins']==$i)?'selected="selected"':''), $i);
-                    }
-                    ?>
-                </select> <?php echo __(
-                'failed login attempt(s) allowed before a lock-out is enforced'); ?>
-                <br/>
-                <select name="staff_login_timeout">
-                  <?php
-                    for ($i = 1; $i <= 10; $i++) {
-                        echo sprintf('<option value="%d" %s>%d</option>', $i,(($config['staff_login_timeout']==$i)?'selected="selected"':''), $i);
-                    }
-                    ?>
-                </select> <?php echo __('minutes locked out'); ?>
-            </td>
-        </tr>
-        <tr><td><?php echo __('Agent Session Timeout'); ?>:</td>
-            <td>
-              <input type="text" name="staff_session_timeout" size=6 value="<?php echo $config['staff_session_timeout']; ?>">
-                <?php echo __('minutes'); ?> <em><?php echo __('(0 to disable)'); ?></em>. <i class="help-tip icon-question-sign" href="#staff_session_timeout"></i>
-            </td>
-        </tr>
-        <tr><td><?php echo __('Bind Agent Session to IP'); ?>:</td>
-            <td>
-              <input type="checkbox" name="staff_ip_binding" <?php echo $config['staff_ip_binding']?'checked="checked"':''; ?>>
-              <i class="help-tip icon-question-sign" href="#bind_staff_session_to_ip"></i>
-            </td>
-        </tr>
-    </tbody>
-    </table>
-   </div>
-   <div id="templates" class="tab_content hidden">
-    <table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2">
-    <tbody>
-<?php
-$res = db_query('select distinct(`type`), id, notes, name, updated from '
-    .PAGE_TABLE
-    .' where isactive=1 group by `type`');
-$contents = array();
-while (list($type, $id, $notes, $name, $u) = db_fetch_row($res))
-    $contents[$type] = array($id, $name, $notes, $u);
+    <?php csrf_token(); ?>
+    <input type="hidden" name="t" value="agents" >
+    <ul class="tabs" id="agents-tabs">
+        <li class="active"><a href="#settings">
+            <i class="icon-asterisk"></i> <?php echo __('Settings'); ?></a></li>
+        <li><a href="#templates">
+            <i class="icon-file-text"></i> <?php echo __('Templates'); ?></a></li>
+    </ul>
+    <div id="agents-tabs_container">
+        <div id="settings" class="tab_content">
+            <table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2">
+                <tbody>
+                    <tr>
+                        <th colspan="2">
+                            <em><b><?php echo __('General Settings'); ?></b></em>
+                        </th>
+                    </tr>
+                    <tr>
+                        <td width="180"><?php echo __('Name Formatting'); ?>:</td>
+                        <td>
+                            <select name="agent_name_format">
+                                <?php foreach (PersonsName::allFormats() as $n=>$f) {
+                                list($desc, $func) = $f;
+                                $selected = ($config['agent_name_format'] == $n) ? 'selected="selected"' : ''; ?>
+                                <option value="<?php echo $n; ?>" <?php echo $selected;
+                                ?>><?php echo __($desc); ?></option>
+                                <?php } ?>
+                            </select>
+                            <i class="help-tip icon-question-sign" href="#agent_name_format"></i>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td width="180"><?php echo __('Avatar Source'); ?>:</td>
+                        <td>
+                            <select name="agent_avatar">
+<?php                       require_once INCLUDE_DIR . 'class.avatar.php';
+                            foreach (AvatarSource::allSources() as $id=>$class) {
+                                $modes = $class::getModes();
+                                if ($modes) {
+                                    echo "<optgroup label=\"{$class::getName()}\">";
+                                    foreach ($modes as $mid=>$mname) {
+                                        $oid = "$id.$mid";
+                                        $selected = ($config['agent_avatar'] == $oid) ? 'selected="selected"' : '';
+                                        echo "<option {$selected} value=\"{$oid}\">{$class::getName()} / {$mname}</option>";
+                                    }
+                                    echo "</optgroup>";
+                                }
+                                else {
+                                    $selected = ($config['agent_avatar'] == $id) ? 'selected="selected"' : '';
+                                    echo "<option {$selected} value=\"{$id}\">{$class::getName()}</option>";
+                                }
+                            } ?>
+                            </select>
+                            <div class="error"><?php echo Format::htmlchars($errors['agent_avatar']); ?></div>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th colspan="2">
+                            <em><b><?php echo __('Authentication Settings'); ?></b></em>
+                        </th>
+                    </tr>
+                    <tr>
+                        <td><?php echo __('Password Expiration Policy'); ?>:</td>
+                        <td>
+                            <select name="passwd_reset_period">
+                            <option value="0"> &mdash; <?php echo __('No expiration'); ?> &mdash;</option>
+                            <?php
+                                for ($i = 1; $i <= 12; $i++) {
+                                echo sprintf('<option value="%d" %s>%s</option>',
+                                    $i,(($config['passwd_reset_period']==$i)?'selected="selected"':''),
+                                    sprintf(_N('Monthly', 'Every %d months', $i), $i));
+                                }
+                            ?>
+                            </select>
+                            <font class="error"><?php echo $errors['passwd_reset_period']; ?></font>
+                            <i class="help-tip icon-question-sign" href="#password_expiration_policy"></i>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td><?php echo __('Allow Password Resets'); ?>:</td>
+                        <td>
+                            <input type="checkbox" name="allow_pw_reset" <?php echo $config['allow_pw_reset']?'checked="checked"':''; ?>>
+                            &nbsp;<i class="help-tip icon-question-sign" href="#allow_password_resets"></i>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td><?php echo __('Reset Token Expiration'); ?>:</td>
+                        <td>
+                            <input type="text" name="pw_reset_window" size="6" value="<?php
+                                echo $config['pw_reset_window']; ?>">
+                                <em><?php echo __('minutes'); ?></em>
+                                <i class="help-tip icon-question-sign" href="#reset_token_expiration"></i>
+                                &nbsp;<font class="error"><?php echo $errors['pw_reset_window']; ?></font>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td><?php echo __('Agent Excessive Logins'); ?>:</td>
+                        <td>
+                            <select name="staff_max_logins">
+                                <?php
+                                    for ($i = 1; $i <= 10; $i++) {
+                                        echo sprintf('<option value="%d" %s>%d</option>', $i,(($config['staff_max_logins']==$i)?'selected="selected"':''), $i);
+                                    }
+                                ?>
+                            </select> <?php echo __(
+                                'failed login attempt(s) allowed before a lock-out is enforced'); ?>
+                            <br/>
+                            <select name="staff_login_timeout">
+                                <?php
+                                    for ($i = 1; $i <= 10; $i++) {
+                                        echo sprintf('<option value="%d" %s>%d</option>', $i,(($config['staff_login_timeout']==$i)?'selected="selected"':''), $i);
+                                    }
+                                ?>
+                            </select> <?php echo __('minutes locked out'); ?>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td><?php echo __('Agent Session Timeout'); ?>:</td>
+                        <td>
+                            <input type="text" name="staff_session_timeout" size=6 value="<?php echo $config['staff_session_timeout']; ?>">
+                            <?php echo __('minutes'); ?> <em><?php echo __('(0 to disable)'); ?></em>. <i class="help-tip icon-question-sign" href="#staff_session_timeout"></i>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td><?php echo __('Bind Agent Session to IP'); ?>:</td>
+                        <td>
+                            <input type="checkbox" name="staff_ip_binding" <?php echo $config['staff_ip_binding']?'checked="checked"':''; ?>>
+                            <i class="help-tip icon-question-sign" href="#bind_staff_session_to_ip"></i>
+                        </td>
+                    </tr>
+                </tbody>
+            </table>
+        </div>
+        <div id="templates" class="tab_content hidden">
+            <table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2">
+                <tbody>
+                    <?php
+                        $res = db_query('select distinct(`type`), id, notes, name, updated from '
+                        .PAGE_TABLE
+                        .' where isactive=1 group by `type`');
+                        $contents = array();
+                        while (list($type, $id, $notes, $name, $u) = db_fetch_row($res))
+                        $contents[$type] = array($id, $name, $notes, $u);
 
-$manage_content = function($title, $content) use ($contents) {
-    list($id, $name, $notes, $upd) = $contents[$content];
-    $notes = explode('. ', $notes);
-    $notes = $notes[0];
-    ?><tr><td colspan="2">
-    <div style="padding:2px 5px">
-    <a href="#ajax.php/content/<?php echo $id; ?>/manage"
-    onclick="javascript:
-        $.dialog($(this).attr('href').substr(1), 201);
-    return false;" class="pull-left"><i class="icon-file-text icon-2x"
-        style="color:#bbb;"></i> </a>
-    <span style="display:inline-block;width:90%;width:calc(100% - 32px);padding-left:10px;line-height:1.2em">
-    <a href="#ajax.php/content/<?php echo $id; ?>/manage"
-    onclick="javascript:
-        $.dialog($(this).attr('href').substr(1), 201, null, {size:'large'});
-    return false;"><?php
-    echo Format::htmlchars($title); ?></a><br/>
-        <span class="faded"><?php
-        echo Format::display($notes); ?>
-        <br><em><?php echo sprintf(__('Last Updated %s'), Format::datetime($upd));
-        ?></em></span>
-    </div></td></tr><?php
-}; ?>
-        <tr>
-            <th colspan="2">
-                <em><b><?php echo __(
-                'Authentication and Registration Templates &amp; Pages'); ?></b></em>
-            </th>
-        </tr>
-        <?php $manage_content(__('Agent Welcome Email'), 'registration-staff'); ?>
-        <?php $manage_content(__('Sign-in Login Banner'), 'banner-staff'); ?>
-        <?php $manage_content(__('Password Reset Email'), 'pwreset-staff'); ?>
-</tbody>
-</table>
-</div>
-<p style="text-align:center">
-    <input class="button" type="submit" name="submit" value="<?php echo __('Save Changes'); ?>">
-    <input class="button" type="reset" name="reset" value="<?php echo __('Reset Changes'); ?>">
-</p>
-</div>
+                        $manage_content = function($title, $content) use ($contents) {
+                        list($id, $name, $notes, $upd) = $contents[$content];
+                        $notes = explode('. ', $notes);
+                        $notes = $notes[0];
+                    ?>
+                    <tr>
+                        <td colspan="2">
+                            <div style="padding:2px 5px">
+                                <a href="#ajax.php/content/<?php echo $id; ?>/manage"
+                                   onclick="javascript:
+                                    $.dialog($(this).attr('href').substr(1), 201);
+                                    return false;" class="pull-left">
+                                    <i class="icon-file-text icon-2x" style="color:#bbb;"></i>
+                                </a>
+                                <span style="display:inline-block;width:90%;width:calc(100% - 32px);padding-left:10px;line-height:1.2em">
+                                <a href="#ajax.php/content/<?php echo $id; ?>/manage"
+                                   onclick="javascript:
+                                    $.dialog($(this).attr('href').substr(1), 201, null, {size:'large'});
+                                    return false;"><?php
+                                    echo Format::htmlchars($title); ?>
+                                    </a>
+                                </span>
+                                <span class="faded"><?php
+                                    echo Format::display($notes); ?>
+                                    <br />
+                                    <em><?php echo sprintf(__('Last Updated %s'), Format::datetime($upd));
+                                    ?></em>
+                                </span>
+                            </div>
+                        </td>
+                    </tr>
+                        <?php
+                        }; ?>
+                    <tr>
+                        <th colspan="2">
+                            <em><b><?php echo __(
+                            'Authentication and Registration Templates &amp; Pages'); ?></b></em>
+                        </th>
+                    </tr>
+                    <?php $manage_content(__('Agent Welcome Email'), 'registration-staff'); ?>
+                    <?php $manage_content(__('Sign-in Login Banner'), 'banner-staff'); ?>
+                    <?php $manage_content(__('Password Reset Email'), 'pwreset-staff'); ?>
+                </tbody>
+            </table>
+        </div>
+    <p style="text-align:center">
+        <input class="button" type="submit" name="submit" value="<?php echo __('Save Changes'); ?>">
+        <input class="button" type="reset" name="reset" value="<?php echo __('Reset Changes'); ?>">
+    </p>
+    </div>
 </form>
diff --git a/include/staff/settings-alerts.inc.php b/include/staff/settings-alerts.inc.php
index 03168d557c872843ce65ae83c41daa2d8fb12c34..b08cdbe4d5e94edfd1927cf2866e93e0c57d0de6 100644
--- a/include/staff/settings-alerts.inc.php
+++ b/include/staff/settings-alerts.inc.php
@@ -1,11 +1,4 @@
-<table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2">
-    <thead>
-        <tr>
-            <th>
-                <h4><?php echo __('Alerts and Notices sent to agents on ticket "events"'); ?></h4>
-            </th>
-        </tr>
-    </thead>
+<table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2">
     <tbody>
         <tr><th><em><b><?php echo __('New Ticket Alert'); ?></b>:
             <i class="help-tip icon-question-sign" href="#ticket_alert"></i>
diff --git a/include/staff/settings-autoresp.inc.php b/include/staff/settings-autoresp.inc.php
index 42a52de40eee2b35f5836ef7639aae04e7b63f5e..24729350f032bd976f86a5c0f3ea0734d055c714 100644
--- a/include/staff/settings-autoresp.inc.php
+++ b/include/staff/settings-autoresp.inc.php
@@ -1,8 +1,7 @@
 <table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2">
     <thead>
         <tr>
-            <th colspan="2">
-                <h4><?php echo __('Autoresponder Setting'); ?></h4>
+            <th colspan="2">
                 <em><?php echo __('Global setting - can be disabled at department or email level.'); ?></em>
             </th>
         </tr>
diff --git a/include/staff/settings-emails.inc.php b/include/staff/settings-emails.inc.php
index 06b631664215fd071d142ce2292616b19c2f9da0..d08b0bec549c19db92eedc134a21ce146f0cd095 100644
--- a/include/staff/settings-emails.inc.php
+++ b/include/staff/settings-emails.inc.php
@@ -9,7 +9,6 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config)
     <thead>
         <tr>
             <th colspan="2">
-                <h4><?php echo __('Email Settings');?></h4>
                 <em><?php echo __('Note that some of the global settings can be overwridden at department/email level.');?></em>
             </th>
         </tr>
diff --git a/include/staff/settings-kb.inc.php b/include/staff/settings-kb.inc.php
index cd55261edc2837f7cfacb81b649429e1830c5fe4..2f7fa6762f54a60089e27ffc0c1f5d6d9d08b49d 100644
--- a/include/staff/settings-kb.inc.php
+++ b/include/staff/settings-kb.inc.php
@@ -9,7 +9,6 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config)
     <thead>
         <tr>
             <th colspan="2">
-                <h4><?php echo __('Knowledge Base Settings');?></h4>
                 <em><?php echo __("Disabling knowledge base disables clients' interface.");?></em>
             </th>
         </tr>
diff --git a/include/staff/settings-pages.inc.php b/include/staff/settings-pages.inc.php
index 586a7087eb79b06e01c3c55c3643587788956450..676c1d473352c7bc27d8c7d181f919249c0ec00b 100644
--- a/include/staff/settings-pages.inc.php
+++ b/include/staff/settings-pages.inc.php
@@ -6,13 +6,22 @@ $pages = Page::getPages();
 <form action="settings.php?t=pages" method="post" id="save"
     enctype="multipart/form-data">
 <?php csrf_token(); ?>
+
+
+
 <input type="hidden" name="t" value="pages" >
+
+<ul class="clean tabs">
+    <li class="active"><a href="#basic-information"><i class="icon-asterisk"></i>
+        <?php echo __('Basic Information'); ?></a></li>
+    <li><a href="#site-pages"><i class="icon-file"></i>
+        <?php echo __('Site Pages'); ?></a></li>
+    <li><a href="#logos"><i class="icon-picture"></i>
+        <?php echo __('Logos'); ?></a></li>
+</ul>
+
+<div class="tab_content" id="basic-information">
 <table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2">
-    <thead><tr>
-        <th colspan="2">
-            <h4><?php echo __('Basic Information'); ?></h4>
-        </th>
-    </tr></thead>
     <tbody>
     <?php
         $form = $ost->company->getForm();
@@ -20,10 +29,13 @@ $pages = Page::getPages();
         $form->render();
     ?>
     </tbody>
+</table>
+</div>
+<div class="hidden tab_content" id="site-pages">
+<table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2">
     <thead>
         <tr>
             <th colspan="2">
-                <h4><?php echo __('Site Pages'); ?></h4>
                 <em><?php echo sprintf(__(
                 'To edit or add new pages go to %s Manage &gt; Site Pages %s'),
                 '<a href="pages.php">','</a>'); ?></em>
@@ -93,95 +105,103 @@ $pages = Page::getPages();
         </tr>
     </tbody>
 </table>
+</div>
+<div class="hidden tab_content" id="logos">
 <table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2">
     <thead>
         <tr>
             <th colspan="2">
-                <h4><?php echo __('Logos'); ?>
-                    <i class="help-tip icon-question-sign" href="#logos"></i>
-                    </h4>
-                <em><?php echo __('System Default Logo'); ?></em>
+                <em><?php echo __('System Default Logo'); ?><i class="help-tip icon-question-sign" href="#logos"></i></em>
             </th>
         </tr>
     </thead>
     <tbody>
         <tr>
-        <td colspan="2">
-<table style="width:100%">
-    <thead><tr>
-        <th>Client</th>
-        <th>Staff</th>
-        <th>Logo</th>
-    </tr></thead>
-    <tbody>
-        <tr>
-            <td>
-                <input type="radio" name="selected-logo" value="0"
-                    style="margin-left: 1em"
-                    <?php if (!$ost->getConfig()->getClientLogoId())
-                        echo 'checked="checked"'; ?>/>
-            </td><td>
-                <input type="radio" name="selected-logo-scp" value="0"
-                    style="margin-left: 1em"
-                    <?php if (!$ost->getConfig()->getStaffLogoId())
-                        echo 'checked="checked"'; ?>/>
-            </td><td>
-                <img src="<?php echo ROOT_PATH; ?>assets/default/images/logo.png"
-                    alt="Default Logo" valign="middle"
-                    style="box-shadow: 0 0 0.5em rgba(0,0,0,0.5);
-                        margin: 0.5em; height: 5em;
-                        vertical-align: middle"/>
-                <img src="<?php echo ROOT_PATH; ?>scp/images/ost-logo.png"
-                    alt="Default Logo" valign="middle"
-                    style="box-shadow: 0 0 0.5em rgba(0,0,0,0.5);
-                        margin: 0.5em; height: 5em;
-                        vertical-align: middle"/>
-            </td>
-        </tr>
-        <tr><th colspan="3">
-            <em><?php echo __('Use a custom logo'); ?>&nbsp;<i class="help-tip icon-question-sign" href="#upload_a_new_logo"></i></em>
-        </th></tr>
-    <?php
-    $current = $ost->getConfig()->getClientLogoId();
-    $currentScp = $ost->getConfig()->getStaffLogoId();
-    foreach (AttachmentFile::allLogos() as $logo) { ?>
-        <tr>
-            <td>
-                <input type="radio" name="selected-logo"
-                    style="margin-left: 1em" value="<?php
-                    echo $logo->getId(); ?>" <?php
-                    if ($logo->getId() == $current)
-                        echo 'checked="checked"'; ?>/>
-            </td><td>
-                <input type="radio" name="selected-logo-scp"
-                    style="margin-left: 1em" value="<?php
-                    echo $logo->getId(); ?>" <?php
-                    if ($logo->getId() == $currentScp)
-                        echo 'checked="checked"'; ?>/>
-            </td><td>
-                <img src="<?php echo $logo->getDownloadUrl(); ?>"
-                    alt="Custom Logo" valign="middle"
-                    style="box-shadow: 0 0 0.5em rgba(0,0,0,0.5);
-                        margin: 0.5em; height: 5em;
-                        vertical-align: middle;"/>
-                <?php if ($logo->getId() != $current && $logo->getId() != $currentScp) { ?>
-                <label>
-                <input type="checkbox" name="delete-logo[]" value="<?php
-                    echo $logo->getId(); ?>"/> <?php echo __('Delete'); ?>
-                </label>
-                <?php } ?>
+            <td colspan="2">
+                <table style="width:100%">
+                    <thead>
+                        <tr>
+                            <th>Client</th>
+                            <th>Staff</th>
+                            <th>Logo</th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr>
+                            <td>
+                                <input type="radio" name="selected-logo" value="0"
+                                       style="margin-left: 1em"
+                                       <?php if (!$ost->getConfig()->getClientLogoId())
+                                        echo 'checked="checked"'; ?>/>
+                            </td>
+                            <td>
+                                <input type="radio" name="selected-logo-scp" value="0"
+                                       style="margin-left: 1em"
+                                       <?php if (!$ost->getConfig()->getStaffLogoId())
+                                            echo 'checked="checked"'; ?>/>
+                            </td>
+                            <td>
+                                <img src="<?php echo ROOT_PATH; ?>assets/default/images/logo.png"
+                                     alt="Default Logo" valign="middle"
+                                     style="box-shadow: 0 0 0.5em rgba(0,0,0,0.5);
+                                            margin: 0.5em; height: 5em;
+                                            vertical-align: middle"/>
+                                <img src="<?php echo ROOT_PATH; ?>scp/images/ost-logo.png"
+                                     alt="Default Logo" valign="middle"
+                                     style="box-shadow: 0 0 0.5em rgba(0,0,0,0.5);
+                                            margin: 0.5em; height: 5em;
+                                            vertical-align: middle"/>
+                            </td>
+                        </tr>
+                        <tr>
+                            <th colspan="3">
+                                <em><?php echo __('Use a custom logo'); ?>&nbsp;<i class="help-tip icon-question-sign" href="#upload_a_new_logo"></i></em>
+                            </th>
+                        </tr>
+                        <?php
+                        $current = $ost->getConfig()->getClientLogoId();
+                        $currentScp = $ost->getConfig()->getStaffLogoId();
+                        foreach (AttachmentFile::allLogos() as $logo) { ?>
+                        <tr>
+                            <td>
+                                <input type="radio" name="selected-logo"
+                                       style="margin-left: 1em" value="<?php
+                            echo $logo->getId(); ?>" <?php
+                            if ($logo->getId() == $current)
+                                echo 'checked="checked"'; ?>/>
+                            </td>
+                            <td>
+                                <input type="radio" name="selected-logo-scp"
+                                       style="margin-left: 1em" value="<?php
+                            echo $logo->getId(); ?>" <?php
+                            if ($logo->getId() == $currentScp)
+                                echo 'checked="checked"'; ?>/>
+                            </td>
+                            <td>
+                                <img src="<?php echo $logo->getDownloadUrl(); ?>"
+                                     alt="Custom Logo" valign="middle"
+                                     style="box-shadow: 0 0 0.5em rgba(0,0,0,0.5);
+                                            margin: 0.5em; height: 5em;
+                                            vertical-align: middle;"/>
+                                <?php if ($logo->getId() != $current && $logo->getId() != $currentScp) { ?>
+                                <label class="checkbox inline">
+                                    <input type="checkbox" name="delete-logo[]" value="<?php
+                                    echo $logo->getId(); ?>"/> <?php echo __('Delete'); ?>
+                                </label>
+                                <?php } ?>
+                            </td>
+                        </tr>
+                        <?php } ?>
+                    </tbody>
+                </table>
+                <b><?php echo __('Upload a new logo'); ?>:</b>
+                <input type="file" name="logo[]" size="30" value="" />
+                <font class="error"><br/><?php echo $errors['logo']; ?></font>
             </td>
         </tr>
-<?php } ?>
-    </tbody>
-</table>
-            <b><?php echo __('Upload a new logo'); ?>:</b>
-            <input type="file" name="logo[]" size="30" value="" />
-            <font class="error"><br/><?php echo $errors['logo']; ?></font>
-        </td>
-        </tr>
     </tbody>
 </table>
+</div>
 <p style="text-align:center;">
     <input class="button" type="submit" name="submit-button" value="<?php
     echo __('Save Changes'); ?>">
diff --git a/include/staff/settings-system.inc.php b/include/staff/settings-system.inc.php
index 809998a5fc2cba056bb82de50d0df9f592b63c34..cd41c566dace888626b9b3fec6a27ff5b4a9b7e8 100644
--- a/include/staff/settings-system.inc.php
+++ b/include/staff/settings-system.inc.php
@@ -3,7 +3,7 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config)
 
 $gmtime = Misc::gmtime();
 ?>
-<h2><?php echo __('System Settings and Preferences');?> - <span class="ltr">osTicket (<?php echo $cfg->getVersion(); ?>)</span></h2>
+<h2><?php echo __('System Settings and Preferences');?> <small>— <span class="ltr">osTicket (<?php echo $cfg->getVersion(); ?>)</span></small></h2>
 <form action="settings.php?t=system" method="post" id="save">
 <?php csrf_token(); ?>
 <input type="hidden" name="t" value="system" >
@@ -11,7 +11,6 @@ $gmtime = Misc::gmtime();
     <thead>
         <tr>
             <th colspan="2">
-                <h4><?php echo __('System Settings and Preferences'); ?></h4>
                 <em><b><?php echo __('General Settings'); ?></b></em>
             </th>
         </tr>
diff --git a/include/staff/settings-tickets.inc.php b/include/staff/settings-tickets.inc.php
index c02f437f76877cf66129641552a88957d7e658c1..8edf21818a2268df33dfbfea2c977ede1afea26f 100644
--- a/include/staff/settings-tickets.inc.php
+++ b/include/staff/settings-tickets.inc.php
@@ -16,13 +16,11 @@ if(!($maxfileuploads=ini_get('max_file_uploads')))
     <li><a href="#alerts"><i class="icon-bell-alt"></i>
         <?php echo __('Alerts and Notices'); ?></a></li>
 </ul>
-
 <div class="tab_content" id="settings">
 <table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2">
     <thead>
         <tr>
             <th colspan="2">
-                <h4><?php echo __('Global Ticket Settings');?></h4>
                 <em><?php echo __('System-wide default ticket settings and options.'); ?></em>
             </th>
         </tr>
diff --git a/include/staff/slaplan.inc.php b/include/staff/slaplan.inc.php
index 484778e8bb49b76ddbe3abae7603a8675c907ec1..a3c806d5a8d842b2aa11ca722a0e33119c964a80 100644
--- a/include/staff/slaplan.inc.php
+++ b/include/staff/slaplan.inc.php
@@ -25,12 +25,15 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
  <input type="hidden" name="id" value="<?php echo $info['id']; ?>">
- <h2><?php echo __('Service Level Agreement');?></h2>
+ <h2><?php echo $title; ?>
+    <?php if (isset($info['name'])) { ?><small>
+    — <?php echo $info['name']; ?></small>
+     <?php } ?>
+</h2>
  <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
     <thead>
         <tr>
             <th colspan="2">
-                <h4><?php echo $title; ?></h4>
                 <em><?php echo __('Tickets are marked overdue on grace period violation.');?></em>
             </th>
         </tr>
@@ -88,8 +91,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
         </tr>
         <tr>
             <th colspan="2">
-                <em><strong><?php echo __('Admin Notes');?></strong>: <?php echo __('Internal notes.');?>
-                &nbsp;&nbsp;<i class="help-tip icon-question-sign" href="#admin_notes"></i></em>
+                <em><strong><?php echo __('Internal Notes');?></strong>: <?php echo __("be liberal, they're internal");?>
                 </em>
             </th>
         </tr>
diff --git a/include/staff/slaplans.inc.php b/include/staff/slaplans.inc.php
index 2e018639d20cc8b5d9e0460afe370668bd3a25d8..3e6c5c93207cba1af6df3648cd5971e0c6451fe8 100644
--- a/include/staff/slaplans.inc.php
+++ b/include/staff/slaplans.inc.php
@@ -40,45 +40,55 @@ $showing = $pageNav->showing().' '._N('SLA plan', 'SLA plans', $count);
 $qstr .= '&amp;order='.($order=='DESC' ? 'ASC' : 'DESC');
 ?>
 <form action="slas.php" method="POST" name="slas">
-
-<div class="pull-left" style="padding-top:5px;">
- <h2><?php echo __('Service Level Agreements');?></h2>
-</div>
-<div class="pull-right flush-right" style="padding-top:5px;padding-right:5px;">
-    <a href="slas.php?a=add" class="green button action-button"><i class="icon-plus-sign"></i> <?php echo __('Add New SLA Plan');?></a>
-
-    <span class="action-button" data-dropdown="#action-dropdown-more">
-       <i class="icon-caret-down pull-right"></i>
-        <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
-    </span>
-     <div id="action-dropdown-more" class="action-dropdown anchor-right">
-        <ul id="actions">
-          <li><a class="confirm" data-name="enable" href="slas.php?a=enable">
-            <i class="icon-ok-sign icon-fixed-width"></i>
-            <?php echo __('Enable'); ?></a></li>
-          <li><a class="confirm" data-name="disable" href="slas.php?a=disable">
-            <i class="icon-ban-circle icon-fixed-width"></i>
-            <?php echo __('Disable'); ?></a></li>
-          <li class="danger"><a class="confirm" data-name="delete" href="slas.php?a=delete">
-            <i class="icon-trash icon-fixed-width"></i>
-            <?php echo __('Delete'); ?></a></li>
-        </ul>
+    <div class="sticky bar opaque">
+        <div class="content">
+            <div class="pull-left flush-left">
+                <h2><?php echo __('Service Level Agreements');?></h2>
+            </div>
+            <div class="pull-right flush-right">
+                <a href="slas.php?a=add" class="green button action-button"><i class="icon-plus-sign"></i> <?php echo __('Add New SLA Plan');?></a>
+                <span class="action-button" data-dropdown="#action-dropdown-more">
+                    <i class="icon-caret-down pull-right"></i>
+                    <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
+                </span>
+                <div id="action-dropdown-more" class="action-dropdown anchor-right">
+                    <ul id="actions">
+                        <li>
+                            <a class="confirm" data-name="enable" href="slas.php?a=enable">
+                                <i class="icon-ok-sign icon-fixed-width"></i>
+                                <?php echo __( 'Enable'); ?>
+                            </a>
+                        </li>
+                        <li>
+                            <a class="confirm" data-name="disable" href="slas.php?a=disable">
+                                <i class="icon-ban-circle icon-fixed-width"></i>
+                                <?php echo __( 'Disable'); ?>
+                            </a>
+                        </li>
+                        <li class="danger">
+                            <a class="confirm" data-name="delete" href="slas.php?a=delete">
+                                <i class="icon-trash icon-fixed-width"></i>
+                                <?php echo __( 'Delete'); ?>
+                            </a>
+                        </li>
+                    </ul>
+                </div>
+            </div>
+        </div>
     </div>
-</div>
-<div class="clear"></div>
+    <div class="clear"></div>
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="mass_process" >
 <input type="hidden" id="action" name="a" value="" >
  <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
-    <caption><?php echo $showing; ?></caption>
     <thead>
         <tr>
-            <th width="7">&nbsp;</th>
-            <th width="320"><a <?php echo $name_sort; ?> href="slas.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name');?></a></th>
-            <th width="100"><a <?php echo $status_sort; ?> href="slas.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Status');?></a></th>
-            <th width="130"><a <?php echo $period_sort; ?> href="slas.php?<?php echo $qstr; ?>&sort=period"><?php echo __('Grace Period (hrs)');?></a></th>
-            <th width="120" nowrap><a <?php echo $created_sort; ?>href="slas.php?<?php echo $qstr; ?>&sort=created"><?php echo __('Date Added');?></a></th>
-            <th width="150" nowrap><a <?php echo $updated_sort; ?>href="slas.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated');?></a></th>
+            <th width="4%">&nbsp;</th>
+            <th width="38%"><a <?php echo $name_sort; ?> href="slas.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name');?></a></th>
+            <th width="8%"><a <?php echo $status_sort; ?> href="slas.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Status');?></a></th>
+            <th><a <?php echo $period_sort; ?> href="slas.php?<?php echo $qstr; ?>&sort=period"><?php echo __('Grace Period (hrs)');?></a></th>
+            <th width="15%" nowrap><a <?php echo $created_sort; ?>href="slas.php?<?php echo $qstr; ?>&sort=created"><?php echo __('Date Added');?></a></th>
+            <th width="20%" nowrap><a <?php echo $updated_sort; ?>href="slas.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated');?></a></th>
         </tr>
     </thead>
     <tbody>
@@ -105,7 +115,7 @@ $qstr .= '&amp;order='.($order=='DESC' ? 'ASC' : 'DESC');
                     $default = '<small><em>(Default)</em></small>';
                 ?>
             <tr id="<?php echo $id; ?>">
-                <td width=7px>
+                <td align="center">
                   <input type="checkbox" class="ckb" name="ids[]" value="<?php echo $id; ?>"
                     <?php echo $sel ? 'checked="checked"' :'' ; ?>>
                 </td>
diff --git a/include/staff/staff.inc.php b/include/staff/staff.inc.php
index 020e281622c359deb25df76694bc9440ea3a1bfa..bf6c8d730307a8cb40790b4c2701dca0fd5fd024 100644
--- a/include/staff/staff.inc.php
+++ b/include/staff/staff.inc.php
@@ -42,10 +42,10 @@ else {
   <input type="hidden" name="id" value="<?php echo $info['id']; ?>">
 
   <h2><?php echo $title; ?>
-    <div>
-      <small><?php echo $staff->getName(); ?></small>
-    </div>
-  </h2>
+      <?php if (isset($staff->staff_id)) { ?><small>
+      — <?php echo $staff->getName(); ?></small>
+      <?php } ?>
+</h2>
 
   <ul class="clean tabs">
     <li class="active"><a href="#account"><i class="icon-user"></i> <?php echo __('Account'); ?></a></li>
@@ -198,7 +198,7 @@ if (count($bks) > 1) {
     </table>
 
     <div style="padding:8px 3px; margin-top: 1.6em">
-        <strong class="big"><?php echo __('Internal Notes');?></strong><br/>
+        <strong class="big"><?php echo __('Internal Notes');?>: </strong>
         <?php echo __("be liberal, they're internal.");?>
     </div>
 
diff --git a/include/staff/staffmembers.inc.php b/include/staff/staffmembers.inc.php
index 0fd390cb7b870fc3883e6f44542b08034f230d89..7a1c75d815be2dc29248dff6569af29bc8a5bc86 100644
--- a/include/staff/staffmembers.inc.php
+++ b/include/staff/staffmembers.inc.php
@@ -80,74 +80,87 @@ $qstr .= '&amp;order='.($order=='-' ? 'ASC' : 'DESC');
 // add limits.
 $agents->limit($pageNav->getLimit())->offset($pageNav->getStart());
 ?>
-<div class="sticky bar">
-    <div class="content">
-        <h2 class="inline"><?php echo __('Agents');?></h2>
-            <div class="pull-left inline">
-                <form action="staff.php" method="GET" name="filter">
-                    <input type="hidden" name="a" value="filter" >
-                    <select name="did" id="did">
-                        <option value="0">&mdash; <?php echo __('All Department');?> &mdash;</option>
-                        <?php
-                        if (($depts=Dept::getDepartments())) {
-                            foreach ($depts as $id => $name) {
-                                $sel=($_REQUEST['did'] && $_REQUEST['did']==$id)?'selected="selected"':'';
-                                echo sprintf('<option value="%d" %s>%s</option>',$id,$sel,$name);
-                            }
-                        }
-                        ?>
-                    </select>
-                    <select name="tid" id="tid">
-                        <option value="0">&mdash; <?php echo __('All Teams');?> &mdash;</option>
-                        <?php
-                        if (($teams=Team::getTeams())) {
-                            foreach ($teams as $id => $name) {
-                                $sel=($_REQUEST['tid'] && $_REQUEST['tid']==$id)?'selected="selected"':'';
-                                echo sprintf('<option value="%d" %s>%s</option>',$id,$sel,$name);
-                            }
-                        }
-                        ?>
-                    </select>
-                    <input type="submit" name="submit" class="small button" value="<?php echo __('Apply');?>"/>
-                </form>
+<div id="basic_search">
+    <div style="min-height:25px;">
+        <div class="pull-left">
+            <form action="staff.php" method="GET" name="filter">
+                <input type="hidden" name="a" value="filter">
+                <select name="did" id="did">
+                    <option value="0">&mdash;
+                        <?php echo __( 'All Department');?> &mdash;</option>
+                    <?php if (($depts=Dept::getDepartments())) { foreach ($depts as $id=> $name) { $sel=($_REQUEST['did'] && $_REQUEST['did']==$id)?'selected="selected"':''; echo sprintf('
+                    <option value="%d" %s>%s</option>',$id,$sel,$name); } } ?>
+                </select>
+                <select name="tid" id="tid">
+                    <option value="0">&mdash;
+                        <?php echo __( 'All Teams');?> &mdash;</option>
+                    <?php if (($teams=Team::getTeams())) { foreach ($teams as $id=> $name) { $sel=($_REQUEST['tid'] && $_REQUEST['tid']==$id)?'selected="selected"':''; echo sprintf('
+                    <option value="%d" %s>%s</option>',$id,$sel,$name); } } ?>
+                </select>
+                <input type="submit" name="submit" class="button muted" value="<?php echo __('Apply');?>" />
+            </form>
+        </div>
+    </div>
+</div>
+<div style="margin-bottom:20px; padding-top:5px;">
+    <div class="sticky bar opaque">
+        <div class="content">
+            <div class="pull-left flush-left">
+                <h2><?php echo __('Agents');?></h2>
             </div>
-        <div class="pull-right">
-            <a class="green button action-button" href="staff.php?a=add">
-                <i class="icon-plus-sign"></i>
-                <?php echo __('Add New Agent'); ?>
-            </a>
-            <span class="action-button" data-dropdown="#action-dropdown-more">
+            <div class="pull-right">
+                <a class="green button action-button" href="staff.php?a=add">
+                    <i class="icon-plus-sign"></i>
+                    <?php echo __( 'Add New Agent'); ?>
+                </a>
+                <span class="action-button" data-dropdown="#action-dropdown-more">
                 <i class="icon-caret-down pull-right"></i>
                 <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
-            </span>
-            <div id="action-dropdown-more" class="action-dropdown anchor-right">
-                <ul id="actions">
-                    <li><a class="confirm" data-form-id="mass-actions" data-name="enable" href="staff.php?a=enable">
-                        <i class="icon-ok-sign icon-fixed-width"></i>
-                        <?php echo __('Enable'); ?></a></li>
-                    <li><a class="confirm" data-form-id="mass-actions" data-name="disable" href="staff.php?a=disable">
-                        <i class="icon-ban-circle icon-fixed-width"></i>
-                        <?php echo __('Disable'); ?></a></li>
-                    <li><a class="dialog-first" data-action="permissions" href="#staff/reset-permissions">
-                        <i class="icon-sitemap icon-fixed-width"></i>
-                        <?php echo __('Reset Permissions'); ?></a></li>
-                    <li><a class="dialog-first" data-action="department" href="#staff/change-department">
-                        <i class="icon-truck icon-fixed-width"></i>
-                        <?php echo __('Change Department'); ?></a></li>
-                    <!-- TODO: Implement "Reset Access" mass action
+                </span>
+                <div id="action-dropdown-more" class="action-dropdown anchor-right">
+                    <ul id="actions">
+                        <li>
+                            <a class="confirm" data-form-id="mass-actions" data-name="enable" href="staff.php?a=enable">
+                                <i class="icon-ok-sign icon-fixed-width"></i>
+                                <?php echo __( 'Enable'); ?>
+                            </a>
+                        </li>
+                        <li>
+                            <a class="confirm" data-form-id="mass-actions" data-name="disable" href="staff.php?a=disable">
+                                <i class="icon-ban-circle icon-fixed-width"></i>
+                                <?php echo __( 'Disable'); ?>
+                            </a>
+                        </li>
+                        <li>
+                            <a class="dialog-first" data-action="permissions" href="#staff/reset-permissions">
+                                <i class="icon-sitemap icon-fixed-width"></i>
+                                <?php echo __( 'Reset Permissions'); ?>
+                            </a>
+                        </li>
+                        <li>
+                            <a class="dialog-first" data-action="department" href="#staff/change-department">
+                                <i class="icon-truck icon-fixed-width"></i>
+                                <?php echo __( 'Change Department'); ?>
+                            </a>
+                        </li>
+                        <!-- TODO: Implement "Reset Access" mass action
                     <li><a class="dialog-first" href="#staff/reset-access">
                     <i class="icon-puzzle-piece icon-fixed-width"></i>
                         <?php echo __('Reset Access'); ?></a></li>
                     -->
-                    <li class="danger"><a class="confirm" data-form-id="mass-actions" data-name="delete" href="staff.php?a=delete">
-                        <i class="icon-trash icon-fixed-width"></i>
-                        <?php echo __('Delete'); ?></a></li>
-                </ul>
+                        <li class="danger">
+                            <a class="confirm" data-form-id="mass-actions" data-name="delete" href="staff.php?a=delete">
+                                <i class="icon-trash icon-fixed-width"></i>
+                                <?php echo __( 'Delete'); ?>
+                            </a>
+                        </li>
+                    </ul>
+                </div>
             </div>
         </div>
-        <div class="clear" style="padding: 3px 0"></div>
     </div>
 </div>
+<div class="clear"></div>
 
 <form id="mass-actions" action="staff.php" method="POST" name="staff" >
 
@@ -155,16 +168,15 @@ $agents->limit($pageNav->getLimit())->offset($pageNav->getStart());
  <input type="hidden" name="do" value="mass_process" >
  <input type="hidden" id="action" name="a" value="" >
  <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
-    <caption><?php echo $showing; ?></caption>
     <thead>
         <tr>
-            <th width="7px">&nbsp;</th>
-            <th width="200"><a <?php echo $name_sort; ?> href="staff.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name');?></a></th>
-            <th width="100"><a <?php echo $username_sort; ?> href="staff.php?<?php echo $qstr; ?>&sort=username"><?php echo __('Username');?></a></th>
-            <th width="100"><a  <?php echo $status_sort; ?> href="staff.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Status');?></a></th>
-            <th width="150"><a  <?php echo $dept_sort; ?>href="staff.php?<?php echo $qstr; ?>&sort=dept"><?php echo __('Department');?></a></th>
-            <th width="100"><a <?php echo $created_sort; ?> href="staff.php?<?php echo $qstr; ?>&sort=created"><?php echo __('Created');?></a></th>
-            <th width="145"><a <?php echo $login_sort; ?> href="staff.php?<?php echo $qstr; ?>&sort=login"><?php echo __('Last Login');?></a></th>
+            <th width="4%">&nbsp;</th>
+            <th width="28%"><a <?php echo $name_sort; ?> href="staff.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name');?></a></th>
+            <th width="16%"><a <?php echo $username_sort; ?> href="staff.php?<?php echo $qstr; ?>&sort=username"><?php echo __('Username');?></a></th>
+            <th width="8%"><a  <?php echo $status_sort; ?> href="staff.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Status');?></a></th>
+            <th width="14%"><a  <?php echo $dept_sort; ?>href="staff.php?<?php echo $qstr; ?>&sort=dept"><?php echo __('Department');?></a></th>
+            <th width="14%"><a <?php echo $created_sort; ?> href="staff.php?<?php echo $qstr; ?>&sort=created"><?php echo __('Created');?></a></th>
+            <th width="16%"><a <?php echo $login_sort; ?> href="staff.php?<?php echo $qstr; ?>&sort=login"><?php echo __('Last Login');?></a></th>
         </tr>
     </thead>
     <tbody>
@@ -178,7 +190,7 @@ $agents->limit($pageNav->getLimit())->offset($pageNav->getStart());
                     $sel=true;
                 ?>
                <tr id="<?php echo $id; ?>">
-                <td width=7px>
+                <td align="center">
                   <input type="checkbox" class="ckb" name="ids[]"
                   value="<?php echo $id; ?>" <?php echo $sel ? 'checked="checked"' : ''; ?> >
                 <td><a href="staff.php?id=<?php echo $id; ?>"><?php echo
diff --git a/include/staff/syslogs.inc.php b/include/staff/syslogs.inc.php
index 68648f99feb37872fcb2949ef6dc386e6c03687d..13d355928e79013c16098e01964812276d454eef 100644
--- a/include/staff/syslogs.inc.php
+++ b/include/staff/syslogs.inc.php
@@ -84,42 +84,58 @@ else
     $showing=__('No logs found!');
 ?>
 
-<h2><?php echo __('System Logs');?>
-    &nbsp;<i class="help-tip icon-question-sign" href="#system_logs"></i>
-</h2>
-<div id='filter' >
- <form action="logs.php" method="get">
-    <div style="padding-left:2px;">
-        <b><?php echo __('Date Span'); ?></b>&nbsp;<i class="help-tip icon-question-sign" href="#date_span"></i>
-        <?php echo __('Between'); ?>:
-        <input class="dp" id="sd" size=15 name="startDate" value="<?php echo Format::htmlchars($_REQUEST['startDate']); ?>" autocomplete=OFF>
-        &nbsp;&nbsp;
-        <input class="dp" id="ed" size=15 name="endDate" value="<?php echo Format::htmlchars($_REQUEST['endDate']); ?>" autocomplete=OFF>
-        &nbsp;<?php echo __('Log Level'); ?>:&nbsp;<i class="help-tip icon-question-sign" href="#type"></i>
-            <select name='type'>
-                <option value="" selected><?php echo __('All');?></option>
-                <option value="Error" <?php echo ($type=='Error')?'selected="selected"':''; ?>><?php echo __('Errors');?></option>
-                <option value="Warning" <?php echo ($type=='Warning')?'selected="selected"':''; ?>><?php echo __('Warnings');?></option>
-                <option value="Debug" <?php echo ($type=='Debug')?'selected="selected"':''; ?>><?php echo __('Debug');?></option>
-            </select>
-            &nbsp;&nbsp;
-            <input type="submit" Value="<?php echo __('Go!');?>" />
+<div id="basic_search">
+    <div style="height:25px">
+        <div id='filter' >
+            <form action="logs.php" method="get">
+                <div style="padding-left:2px;">
+                    <i class="help-tip icon-question-sign" href="#date_span"></i>
+                    <?php echo __('Between'); ?>:
+                    <input class="dp" id="sd" size=15 name="startDate" value="<?php echo Format::htmlchars($_REQUEST['startDate']); ?>" autocomplete=OFF>
+                    &nbsp;&nbsp;
+                    <input class="dp" id="ed" size=15 name="endDate" value="<?php echo Format::htmlchars($_REQUEST['endDate']); ?>" autocomplete=OFF>
+                    &nbsp;<?php echo __('Log Level'); ?>:&nbsp;<i class="help-tip icon-question-sign" href="#type"></i>
+                    <select name='type'>
+                        <option value="" selected><?php echo __('All');?></option>
+                        <option value="Error" <?php echo ($type=='Error')?'selected="selected"':''; ?>><?php echo __('Errors');?></option>
+                        <option value="Warning" <?php echo ($type=='Warning')?'selected="selected"':''; ?>><?php echo __('Warnings');?></option>                <option value="Debug" <?php echo ($type=='Debug')?'selected="selected"':''; ?>><?php echo __('Debug');?></option>
+                    </select>
+                    &nbsp;&nbsp;
+                    <input type="submit" Value="<?php echo __('Go!');?>" />
+                </div>
+            </form>
+        </div>
     </div>
- </form>
 </div>
+<div class="clear"></div>
 <form action="logs.php" method="POST" name="logs">
+    <div style="margin-bottom:20px; padding-top:5px;">
+        <div class="sticky bar opaque">
+            <div class="content">
+                <div class="pull-left flush-left">
+                    <h2><?php echo __('System Logs');?>
+            <i class="help-tip icon-question-sign" href="#system_logs"></i>
+            </h2>
+                </div>
+                <div id="actions" class="pull-right flush-right">
+                    <button class="red button" type="submit" name="delete"><i class="icon-trash"></i>
+                        <?php echo __( 'Delete Selected Entries');?>
+                    </button>
+                </div>
+            </div>
+        </div>
+    </div>
 <?php csrf_token(); ?>
  <input type="hidden" name="do" value="mass_process" >
  <input type="hidden" id="action" name="a" value="" >
  <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
-    <caption><?php echo $showing; ?></caption>
     <thead>
         <tr>
-            <th width="7">&nbsp;</th>
-            <th width="320"><a <?php echo $title_sort; ?> href="logs.php?<?php echo $qstr; ?>&sort=title"><?php echo __('Log Title');?></a></th>
-            <th width="100"><a  <?php echo $type_sort; ?> href="logs.php?<?php echo $qstr; ?>&sort=type"><?php echo __('Log Type');?></a></th>
-            <th width="200" nowrap><a  <?php echo $date_sort; ?>href="logs.php?<?php echo $qstr; ?>&sort=date"><?php echo __('Log Date');?></a></th>
-            <th width="120"><a  <?php echo $ip_sort; ?> href="logs.php?<?php echo $qstr; ?>&sort=ip"><?php echo __('IP Address');?></a></th>
+            <th width="4%">&nbsp;</th>
+            <th width="40%"><a <?php echo $title_sort; ?> href="logs.php?<?php echo $qstr; ?>&sort=title"><?php echo __('Log Title');?></a></th>
+            <th width="11%"><a  <?php echo $type_sort; ?> href="logs.php?<?php echo $qstr; ?>&sort=type"><?php echo __('Log Type');?></a></th>
+            <th width="30%" nowrap><a  <?php echo $date_sort; ?>href="logs.php?<?php echo $qstr; ?>&sort=date"><?php echo __('Log Date');?></a></th>
+            <th width="15%"><a  <?php echo $ip_sort; ?> href="logs.php?<?php echo $qstr; ?>&sort=ip"><?php echo __('IP Address');?></a></th>
         </tr>
     </thead>
     <tbody>
@@ -133,7 +149,7 @@ else
                     $sel=true;
                 ?>
             <tr id="<?php echo $row['log_id']; ?>">
-                <td width=7px>
+                <td align="center" nowrap>
                   <input type="checkbox" class="ckb" name="ids[]" value="<?php echo $row['log_id']; ?>"
                             <?php echo $sel?'checked="checked"':''; ?>> </td>
                 <td>&nbsp;<a class="tip" href="#log/<?php echo $row['log_id']; ?>"><?php echo Format::htmlchars($row['title']); ?></a></td>
@@ -164,9 +180,7 @@ else
 if($res && $num): //Show options..
     echo '<div>&nbsp;'.__('Page').':'.$pageNav->getPageLinks().'&nbsp;</div>';
 ?>
-<p class="centered" id="actions">
-    <input class="button" type="submit" name="delete" value="<?php echo __('Delete Selected Entries');?>">
-</p>
+
 <?php
 endif;
 ?>
diff --git a/include/staff/tasks.inc.php b/include/staff/tasks.inc.php
index 2307d1975a1a6afa16d7ec2a8ea36093b8233f57..9c96ad5bb3ac752dfc173482fbf9dfa71bfdc43f 100644
--- a/include/staff/tasks.inc.php
+++ b/include/staff/tasks.inc.php
@@ -228,27 +228,27 @@ if ($thisstaff->hasPerm(Task::PERM_DELETE, false)) {
     ?>
    </div>
     <form action="tasks.php" method="get" onsubmit="javascript:
-  $.pjax({
-    url:$(this).attr('action') + '?' + $(this).serialize(),
-    container:'#pjax-container',
-    timeout: 2000
-  });
-return false;">
-    <input type="hidden" name="a" value="search">
-    <input type="hidden" name="search-type" value=""/>
-    <div class="attached input">
-      <input type="text" class="basic-search" data-url="ajax.php/tasks/lookup" name="query"
-        autofocus size="30" value="<?php echo Format::htmlchars($_REQUEST['query'], true); ?>"
-        autocomplete="off" autocorrect="off" autocapitalize="off">
-      <button type="submit" class="attached button"><i class="icon-search"></i>
-      </button>
-    </div>
+        $.pjax({
+        url:$(this).attr('action') + '?' + $(this).serialize(),
+        container:'#pjax-container',
+        timeout: 2000
+        });
+        return false;">
+        <input type="hidden" name="a" value="search">
+        <input type="hidden" name="search-type" value=""/>
+        <div class="attached input">
+            <input type="text" class="basic-search" data-url="ajax.php/tasks/lookup" name="query"
+                   autofocus size="30" value="<?php echo Format::htmlchars($_REQUEST['query'], true); ?>"
+                   autocomplete="off" autocorrect="off" autocapitalize="off">
+            <button type="submit" class="attached button"><i class="icon-search"></i>
+            </button>
+        </div>
     </form>
 
 </div>
 <!-- SEARCH FORM END -->
 <div class="clear"></div>
-<div style="margin-bottom:20px; padding-top:10px;">
+<div style="margin-bottom:20px; padding-top:5px;">
 <div class="sticky bar opaque">
     <div class="content">
         <div class="pull-left flush-left">
@@ -275,17 +275,17 @@ return false;">
     <thead>
         <tr>
             <?php if ($thisstaff->canManageTickets()) { ?>
-	        <th width="8px">&nbsp;</th>
+	        <th width="4%">&nbsp;</th>
             <?php } ?>
-	        <th width="70">
+	        <th width="8%">
                 <?php echo __('Number'); ?></th>
-	        <th width="70">
+	        <th width="20%">
                 <?php echo $date_header ?: __('Date'); ?></th>
-	        <th width="280">
+	        <th width="38%">
                 <?php echo __('Title'); ?></th>
-            <th width="250">
+            <th width="15%">
                 <?php echo __('Department');?></th>
-            <th width="250">
+            <th width="15%">
                 <?php echo __('Assignee');?></th>
         </tr>
      </thead>
diff --git a/include/staff/team.inc.php b/include/staff/team.inc.php
index 4fb127ec567eb8543184957bb0f3a964f3c4f824..3552d2cc7f925ba106ae85c3e73a7315bd6464f0 100644
--- a/include/staff/team.inc.php
+++ b/include/staff/team.inc.php
@@ -28,9 +28,12 @@ $info = $team->getInfo();
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
  <input type="hidden" name="id" value="<?php echo $team->getId(); ?>">
- <h2><?php echo __('Team');?>&nbsp;
+ <h2><?php echo $title; ?>
+    <?php if (isset($team->name)) { ?><small>
+    — <?php echo $team->getName(); ?></small>
+    <?php } ?>
     <i class="help-tip icon-question-sign" href="#teams"></i>
-    </h2>
+</h2>
 <br>
 <ul class="clean tabs">
     <li class="active"><a href="#team">
@@ -44,7 +47,6 @@ $info = $team->getInfo();
     <thead>
         <tr>
             <th colspan="2">
-                <h4><?php echo $title; ?></h4>
                 <em><strong><?php echo __('Team Information'); ?></strong>:</em>
             </th>
         </tr>
diff --git a/include/staff/teams.inc.php b/include/staff/teams.inc.php
index 8296b06c623d5b86de8a811e5fe79a88ebc402d4..e54adb993f659bb56f4135e9bf20b63b2b0fe630 100644
--- a/include/staff/teams.inc.php
+++ b/include/staff/teams.inc.php
@@ -78,16 +78,15 @@ $qstr .= '&amp;order='.urlencode($order=='DESC' ? 'ASC' : 'DESC');
  <input type="hidden" name="do" value="mass_process" >
  <input type="hidden" id="action" name="a" value="" >
  <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
-    <caption><?php echo $showing; ?></caption>
     <thead>
         <tr>
-            <th width="7px">&nbsp;</th>
-            <th width="250"><a <?php echo $name_sort; ?> href="teams.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Team Name');?></a></th>
-            <th width="80"><a  <?php echo $status_sort; ?> href="teams.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Status');?></a></th>
-            <th width="80"><a  <?php echo $members_sort; ?>href="teams.php?<?php echo $qstr; ?>&sort=members"><?php echo __('Members');?></a></th>
-            <th width="200"><a  <?php echo $lead_sort; ?> href="teams.php?<?php echo $qstr; ?>&sort=lead"><?php echo __('Team Lead');?></a></th>
-            <th width="100"><a  <?php echo $created_sort; ?> href="teams.php?<?php echo $qstr; ?>&sort=created"><?php echo __('Created');?></a></th>
-            <th width="130"><a  <?php echo $updated_sort; ?> href="teams.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated');?></a></th>
+            <th width="4%">&nbsp;</th>
+            <th width="25%"><a <?php echo $name_sort; ?> href="teams.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Team Name');?></a></th>
+            <th width="8%"><a  <?php echo $status_sort; ?> href="teams.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Status');?></a></th>
+            <th width="8%"><a  <?php echo $members_sort; ?>href="teams.php?<?php echo $qstr; ?>&sort=members"><?php echo __('Members');?></a></th>
+            <th width="20%"><a  <?php echo $lead_sort; ?> href="teams.php?<?php echo $qstr; ?>&sort=lead"><?php echo __('Team Lead');?></a></th>
+            <th width="15%"><a  <?php echo $created_sort; ?> href="teams.php?<?php echo $qstr; ?>&sort=created"><?php echo __('Created');?></a></th>
+            <th width="20%"><a  <?php echo $updated_sort; ?> href="teams.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated');?></a></th>
         </tr>
     </thead>
     <tbody>
@@ -111,7 +110,7 @@ $qstr .= '&amp;order='.urlencode($order=='DESC' ? 'ASC' : 'DESC');
                     $sel=true;
                 ?>
             <tr id="<?php echo $id; ?>">
-                <td width=7px>
+                <td align="center">
                   <input type="checkbox" class="ckb" name="ids[]"
                   value="<?php echo $id; ?>"
                             <?php echo $sel ? 'checked="checked"' : ''; ?>> </td>
diff --git a/include/staff/template.inc.php b/include/staff/template.inc.php
index 073908166ee3a3ebb5388de462cb701d72d508d9..7dd34df896a9dfacdaab3c3bf76370e1bd72dd9e 100644
--- a/include/staff/template.inc.php
+++ b/include/staff/template.inc.php
@@ -24,12 +24,15 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
  <input type="hidden" name="tpl_id" value="<?php echo $info['tpl_id']; ?>">
- <h2><?php echo __('Email Template');?></h2>
+ <h2><?php echo $title; ?>
+    <?php if (isset($info['name'])) { ?><small>
+    — <?php echo $info['name']; ?></small>
+     <?php } ?>
+</h2>
  <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
     <thead>
         <tr>
             <th colspan="2">
-                <h4><?php echo $title; ?></h4>
                 <em><?php echo __('Template information');?></em>
             </th>
         </tr>
diff --git a/include/staff/templates.inc.php b/include/staff/templates.inc.php
index a64906211d51b3c88ec6dbfdd1c30cc7d9d89637..0ed4dea249352587ccc084b28e835ee58e0ed102 100644
--- a/include/staff/templates.inc.php
+++ b/include/staff/templates.inc.php
@@ -43,46 +43,55 @@ else
 
 ?>
 <form action="templates.php" method="POST" name="tpls">
-
-<div class="pull-left" style="padding-top:5px;">
- <h2><?php echo __('Email Template Sets'); ?></h2>
-</div>
-<div class="pull-right flush-right" style="padding-top:5px;padding-right:5px;">
- <a href="templates.php?a=add" class="green button action-button"><i class="icon-plus-sign"></i> <?php echo __('Add New Template Set'); ?></a>
-
-    <span class="action-button" data-dropdown="#action-dropdown-more">
-       <i class="icon-caret-down pull-right"></i>
-        <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
-    </span>
-     <div id="action-dropdown-more" class="action-dropdown anchor-right">
-        <ul id="actions">
-          <li><a class="confirm" data-name="enable" href="templates.php?a=enable">
-            <i class="icon-ok-sign icon-fixed-width"></i>
-            <?php echo __('Enable'); ?></a></li>
-          <li><a class="confirm" data-name="disable" href="templates.php?a=disable">
-            <i class="icon-ban-circle icon-fixed-width"></i>
-            <?php echo __('Disable'); ?></a></li>
-          <li class="danger"><a class="confirm" data-name="delete" href="templates.php?a=delete">
-            <i class="icon-trash icon-fixed-width"></i>
-            <?php echo __('Delete'); ?></a></li>
-        </ul>
+    <div class="sticky bar opaque">
+        <div class="content">
+            <div class="pull-left flush-left">
+                <h2><?php echo __('Email Template Sets'); ?></h2>
+            </div>
+            <div class="pull-right flush-right">
+                <a href="templates.php?a=add" class="green button action-button"><i class="icon-plus-sign"></i> <?php echo __('Add New Template Set'); ?></a>
+                <span class="action-button" data-dropdown="#action-dropdown-more">
+                    <i class="icon-caret-down pull-right"></i>
+                    <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
+                </span>
+                <div id="action-dropdown-more" class="action-dropdown anchor-right">
+                    <ul id="actions">
+                        <li>
+                            <a class="confirm" data-name="enable" href="templates.php?a=enable">
+                                <i class="icon-ok-sign icon-fixed-width"></i>
+                                <?php echo __( 'Enable'); ?>
+                            </a>
+                        </li>
+                        <li>
+                            <a class="confirm" data-name="disable" href="templates.php?a=disable">
+                                <i class="icon-ban-circle icon-fixed-width"></i>
+                                <?php echo __( 'Disable'); ?>
+                            </a>
+                        </li>
+                        <li class="danger">
+                            <a class="confirm" data-name="delete" href="templates.php?a=delete">
+                                <i class="icon-trash icon-fixed-width"></i>
+                                <?php echo __( 'Delete'); ?>
+                            </a>
+                        </li>
+                    </ul>
+                </div>
+            </div>
+        </div>
     </div>
-
-</div>
-<div class="clear"></div>
+    <div class="clear"></div>
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="mass_process" >
 <input type="hidden" id="action" name="a" value="" >
  <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
-    <caption><?php echo $showing; ?></caption>
     <thead>
         <tr>
-            <th width="7">&nbsp;</th>
-            <th width="350"><a <?php echo $name_sort; ?> href="templates.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name'); ?></a></th>
-            <th width="100"><a  <?php echo $status_sort; ?> href="templates.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Status'); ?></a></th>
-            <th width="80"><a <?php echo $inuse_sort; ?> href="templates.php?<?php echo $qstr; ?>&sort=inuse"><?php echo __('In-Use'); ?></a></th>
-            <th width="120" nowrap><a  <?php echo $created_sort; ?>href="templates.php?<?php echo $qstr; ?>&sort=created"><?php echo __('Date Added'); ?></a></th>
-            <th width="150" nowrap><a  <?php echo $updated_sort; ?>href="templates.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated'); ?></a></th>
+            <th width="4%">&nbsp;</th>
+            <th width="46%"><a <?php echo $name_sort; ?> href="templates.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name'); ?></a></th>
+            <th width="10%"><a  <?php echo $status_sort; ?> href="templates.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Status'); ?></a></th>
+            <th width="10%"><a <?php echo $inuse_sort; ?> href="templates.php?<?php echo $qstr; ?>&sort=inuse"><?php echo __('In-Use'); ?></a></th>
+            <th width="10%" nowrap><a  <?php echo $created_sort; ?>href="templates.php?<?php echo $qstr; ?>&sort=created"><?php echo __('Date Added'); ?></a></th>
+            <th width="20%" nowrap><a  <?php echo $updated_sort; ?>href="templates.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated'); ?></a></th>
         </tr>
     </thead>
     <tbody>
@@ -100,7 +109,7 @@ else
                 $default=($defaultTplId==$row['tpl_id'])?'<small class="fadded">('.__('System Default').')</small>':'';
                 ?>
             <tr id="<?php echo $row['tpl_id']; ?>">
-                <td width=7px>
+                <td align="center">
                   <input type="checkbox" class="ckb" name="ids[]" value="<?php echo $row['tpl_id']; ?>"
                             <?php echo $sel?'checked="checked"':''; ?> <?php echo $default?'disabled="disabled"':''; ?> >
                 </td>
diff --git a/include/staff/templates/task-view.tmpl.php b/include/staff/templates/task-view.tmpl.php
index b69be9dfbb1f19742eb8094a8346845ee12923ee..fda5d66ef682fc62fd50d9621652365c594b2877 100644
--- a/include/staff/templates/task-view.tmpl.php
+++ b/include/staff/templates/task-view.tmpl.php
@@ -102,8 +102,9 @@ if ($task->isOverdue())
                 href="tasks.php?id=<?php echo $task->getId(); ?>"
                 ><i class="icon-refresh"></i> <?php
                 echo sprintf(__('Task #%s'), $task->getNumber()); ?></a>
-                <span class="faded notsticky">&nbsp;&mdash; &nbsp;<?php echo $task->getTitle(); ?></span>
-               </h2>
+                   <?php if ($task) { ?> – <small><span class="ltr"><?php echo $task->getTitle(); ?></span></small>
+                <?php } ?>
+            </h2>
             <?php
             } ?>
         </div>
@@ -425,9 +426,9 @@ else
                 </td>
             </tr>
         </table>
-       <p  style="padding-left:165px;">
-           <input class="btn_sm" type="submit" value="<?php echo __('Post Update');?>">
-           <input class="btn_sm" type="reset" value="<?php echo __('Reset');?>">
+       <p  style="text-align:center;">
+           <input class="save pending" type="submit" value="<?php echo __('Post Update');?>">
+           <input type="reset" value="<?php echo __('Reset');?>">
        </p>
     </form>
     <?php
@@ -485,9 +486,9 @@ else
                 </td>
             </tr>
         </table>
-       <p  style="padding-left:165px;">
-           <input class="btn_sm" type="submit" value="<?php echo __('Post Note');?>">
-           <input class="btn_sm" type="reset" value="<?php echo __('Reset');?>">
+       <p  style="text-align:center;">
+           <input class="save pending" type="submit" value="<?php echo __('Post Note');?>">
+           <input type="reset" value="<?php echo __('Reset');?>">
        </p>
     </form>
  </div>
diff --git a/include/staff/templates/tickets.tmpl.php b/include/staff/templates/tickets.tmpl.php
index d7ee6521b612e7e19a5944fbc2bb7b78c11f165b..038ed8057ae237dd134423c16d3b0d6e057cb4c2 100644
--- a/include/staff/templates/tickets.tmpl.php
+++ b/include/staff/templates/tickets.tmpl.php
@@ -48,7 +48,7 @@ TicketForm::ensureDynamicDataView();
 // Fetch the results
 $results = count($tickets);
 ?>
-<div style="width:700px;" class="pull-left">
+<div class="pull-left" style="margin-top:5px;">
    <?php
     if ($results) {
         echo '<strong>'.sprintf(_N('Showing %d ticket', 'Showing %d tickets',
@@ -58,13 +58,15 @@ $results = count($tickets);
     }
    ?>
 </div>
-<div class="pull-right flush-right" style="padding-right:5px;">
-    <?php
-    if ($user) { ?>
-    <b><a class="Icon newTicket" href="tickets.php?a=open&uid=<?php echo $user->getId(); ?>">
-    <?php print __('Create New Ticket'); ?></a></b>
-    <?php
-    } ?>
+<div style="margin-bottom:10px;">
+    <div class="pull-right flush-right">
+        <?php
+        if ($user) { ?>
+            <a class="green button action-button" href="tickets.php?a=open&uid=<?php echo $user->getId(); ?>">
+                <i class="icon-plus"></i> <?php print __('Create New Ticket'); ?></a>
+        <?php
+        } ?>
+    </div>
 </div>
 <br/>
 <div>
@@ -79,20 +81,20 @@ if ($results) { ?>
         <tr>
             <?php
             if (0) {?>
-            <th width="8px">&nbsp;</th>
+            <th width="4%">&nbsp;</th>
             <?php
             } ?>
-            <th width="70"><?php echo __('Ticket'); ?></th>
-            <th width="120"><?php echo __('Last Updated'); ?></th>
-            <th width="70"><?php echo __('Status'); ?></th>
-            <th width="380"><?php echo __('Subject'); ?></th>
+            <th width="10%"><?php echo __('Ticket'); ?></th>
+            <th width="18%"><?php echo __('Last Updated'); ?></th>
+            <th width="8%"><?php echo __('Status'); ?></th>
+            <th width="30%"><?php echo __('Subject'); ?></th>
             <?php
             if ($user) { ?>
-            <th width="125"><?php echo __('Department'); ?></th>
-            <th width="125"><?php echo __('Assignee'); ?></th>
+            <th width="15%"><?php echo __('Department'); ?></th>
+            <th width="15%"><?php echo __('Assignee'); ?></th>
             <?php
             } else { ?>
-            <th width="250"><?php echo __('User'); ?></th>
+            <th width="30%"><?php echo __('User'); ?></th>
             <?php
             } ?>
         </tr>
@@ -157,7 +159,7 @@ if ($results) { ?>
                         echo '<span class="faded-more" data-toggle="tooltip" title="'
                             .$T['collab_count'].'"><i class="icon-group"></i></span>';
                 ?>
-            </span></td>
+            </td>
             <?php
             if ($user) {
                 $dept = Dept::getLocalById($T['dept_id'], 'name', $T['dept__name']); ?>
@@ -170,7 +172,7 @@ if ($results) { ?>
             <td><a class="truncate" style="max-width:250px" href="users.php?id="<?php
                 echo $T['user_id']; ?>><?php echo Format::htmlchars($T['user__name']);
                     ?> <em>&lt;<?php echo Format::htmlchars($T['user__default_email__address']);
-                    ?>&gt;</em</a>
+                ?>&gt;</em></a>
             </td>
             <?php
             } ?>
diff --git a/include/staff/templates/users.tmpl.php b/include/staff/templates/users.tmpl.php
index 636e3999c49459738d201b1827d853ec4c85e087..7d56f26ef739863fd02ec9ccfdfdd89c82b3d9ef 100644
--- a/include/staff/templates/users.tmpl.php
+++ b/include/staff/templates/users.tmpl.php
@@ -56,22 +56,22 @@ else
     $showing .= __("This organization doesn't have any users yet");
 
 ?>
-<div style="width:700px;" class="pull-left"><b><?php echo $showing; ?></b></div>
+<form action="orgs.php?id=<?php echo $org->getId(); ?>" method="POST" name="users" >
+
+<div style="margin-top:5px;" class="pull-left"><b><?php echo $showing; ?></b></div>
 <?php if ($thisstaff->hasPerm(User::PERM_EDIT)) { ?>
-<div class="pull-right flush-right" style="padding-right:5px;">
-    <b><a href="#orgs/<?php echo $org->getId(); ?>/add-user" class="Icon newstaff add-user"
-        ><?php echo __('Add User'); ?></a></b>
-    |
-    <b><a href="#orgs/<?php echo $org->getId(); ?>/import-users" class="add-user">
-    <i class="icon-cloud-upload icon-large"></i>
-    <?php echo __('Import'); ?></a></b>
+<div class="pull-right flush-right" style="margin-bottom:10px;">
+    <a href="#orgs/<?php echo $org->getId(); ?>/add-user" class="green button action-button add-user"
+        ><i class="icon-plus"></i> <?php echo __('Add User'); ?></a>
+    <a href="#orgs/<?php echo $org->getId(); ?>/import-users" class="button action-button add-user">
+        <i class="icon-cloud-upload icon-large"></i>
+    <?php echo __('Import'); ?></a>
+    <button id="actions" class="red button action-button" type="submit" name="remove-users"><i class="icon-trash"></i> <?php echo __('Remove'); ?></button>
 </div>
 <?php } ?>
 <div class="clear"></div>
-<br/>
 <?php
 if ($num) { ?>
-<form action="orgs.php?id=<?php echo $org->getId(); ?>" method="POST" name="users" >
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="mass_process" >
  <input type="hidden" id="id" name="id" value="<?php echo $org->getId(); ?>" >
@@ -79,11 +79,11 @@ if ($num) { ?>
  <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
     <thead>
         <tr>
-            <th width="7px">&nbsp;</th>
-            <th width="350"><?php echo __('Name'); ?></th>
-            <th width="300"><?php echo __('Email'); ?></th>
-            <th width="100"><?php echo __('Status'); ?></th>
-            <th width="100"><?php echo __('Created'); ?></th>
+            <th width="4%">&nbsp;</th>
+            <th width="38%"><?php echo __('Name'); ?></th>
+            <th width="35%"><?php echo __('Email'); ?></th>
+            <th width="8%"><?php echo __('Status'); ?></th>
+            <th width="15%"><?php echo __('Created'); ?></th>
         </tr>
     </thead>
     <tbody>
@@ -99,7 +99,7 @@ if ($num) { ?>
                     $sel=true;
                 ?>
                <tr id="<?php echo $row['id']; ?>">
-                <td width=7px>
+                <td align="center">
                   <input type="checkbox" class="ckb" name="ids[]"
                     value="<?php echo $row['id']; ?>" <?php echo $sel?'checked="checked"':''; ?> >
                 </td>
@@ -148,9 +148,7 @@ if ($res && $num) { //Show options..
     echo '<div>&nbsp;'.__('Page').':'.$pageNav->getPageLinks().'&nbsp;</div>';
 
     ?>
-    <p class="centered" id="actions">
-        <input class="button" type="submit" name="remove-users" value="<?php echo __('Remove'); ?>" >
-    </p>
+
 <?php
 }
 ?>
diff --git a/include/staff/ticket-edit.inc.php b/include/staff/ticket-edit.inc.php
index e2bd902e24dc762bfb4bc8eee9b8eff338daf267..d6312bf0e9893f9b4ea6842abfc6812a598fa29e 100644
--- a/include/staff/ticket-edit.inc.php
+++ b/include/staff/ticket-edit.inc.php
@@ -11,19 +11,23 @@ if ($_POST)
     $info['duedate'] = Format::date(strtotime($info['duedate']), false, false, 'UTC');
 ?>
 <form action="tickets.php?id=<?php echo $ticket->getId(); ?>&a=edit" method="post" id="save"  enctype="multipart/form-data">
- <?php csrf_token(); ?>
- <input type="hidden" name="do" value="update">
- <input type="hidden" name="a" value="edit">
- <input type="hidden" name="id" value="<?php echo $ticket->getId(); ?>">
- <h2><?php echo sprintf(__('Update Ticket #%s'),$ticket->getNumber());?></h2>
- <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
-    <tbody>
-        <tr>
-            <th colspan="2">
-                <em><strong><?php echo __('User Information'); ?></strong>: <?php echo __('Currently selected user'); ?></em>
-            </th>
-        </tr>
-    <?php
+    <?php csrf_token(); ?>
+    <input type="hidden" name="do" value="update">
+    <input type="hidden" name="a" value="edit">
+    <input type="hidden" name="id" value="<?php echo $ticket->getId(); ?>">
+    <div style="margin-bottom:20px; padding-top:5px;">
+        <div class="pull-left flush-left">
+            <h2><?php echo sprintf(__('Update Ticket #%s'),$ticket->getNumber());?></h2>
+        </div>
+    </div>
+    <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
+        <tbody>
+            <tr>
+                <th colspan="2">
+                    <em><strong><?php echo __('User Information'); ?></strong>: <?php echo __('Currently selected user'); ?></em>
+                </th>
+            </tr>
+        <?php
     if(!$info['user_id'] || !($user = User::lookup($info['user_id'])))
         $user = $ticket->getUser();
     ?>
@@ -156,7 +160,7 @@ if ($_POST)
         </tr>
     </tbody>
 </table>
-<p style="padding-left:250px;">
+<p style="text-align:center;">
     <input type="submit" name="submit" value="<?php echo __('Save');?>">
     <input type="reset"  name="reset"  value="<?php echo __('Reset');?>">
     <input type="button" name="cancel" value="<?php echo __('Cancel');?>" onclick='window.location.href="tickets.php?id=<?php echo $ticket->getId(); ?>"'>
diff --git a/include/staff/ticket-open.inc.php b/include/staff/ticket-open.inc.php
index 4b536cd24b2ea23be202e028667785747d62d882..3173d7e92bb2004149bfa209aefc84760cdb675a 100644
--- a/include/staff/ticket-open.inc.php
+++ b/include/staff/ticket-open.inc.php
@@ -29,19 +29,18 @@ if ($_POST)
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="create">
  <input type="hidden" name="a" value="open">
- <h2><?php echo __('Open a New Ticket');?></h2>
+<div style="margin-bottom:20px; padding-top:5px;">
+    <div class="pull-left flush-left">
+        <h2><?php echo __('Open a New Ticket');?></h2>
+    </div>
+</div>
  <table class="form_table fixed" width="940" border="0" cellspacing="0" cellpadding="2">
     <thead>
     <!-- This looks empty - but beware, with fixed table layout, the user
          agent will usually only consult the cells in the first row to
          construct the column widths of the entire toable. Therefore, the
          first row needs to have two cells -->
-        <tr><td></td><td></td></tr>
-        <tr>
-            <th colspan="2">
-                <h4><?php echo __('New Ticket');?></h4>
-            </th>
-        </tr>
+        <tr><td style="padding:0;"></td><td style="padding:0;"></td></tr>
     </thead>
     <tbody>
         <tr>
@@ -306,8 +305,8 @@ if ($_POST)
                         }
                         ?>
                     </select>
-                    &nbsp;&nbsp;&nbsp;
-                    <label><input type='checkbox' value='1' name="append" id="append" checked="checked"><?php echo __('Append');?></label>
+                    &nbsp;&nbsp;
+                    <label class="checkbox inline"><input type='checkbox' value='1' name="append" id="append" checked="checked"><?php echo __('Append');?></label>
                 </div>
             <?php
             }
diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php
index 5bf1a6e5c988d9b94a3549eeb474508cab34669c..9f0c7fca0d5c8b08b921ea19be07246cd8028029 100644
--- a/include/staff/ticket-view.inc.php
+++ b/include/staff/ticket-view.inc.php
@@ -50,7 +50,7 @@ if($ticket->isOverdue())
     $warn.='&nbsp;&nbsp;<span class="Icon overdueTicket">'.__('Marked overdue!').'</span>';
 
 ?>
-<div class="has_bottom_border">
+<div>
     <div class="sticky bar">
        <div class="content">
         <div class="pull-right flush-right">
@@ -193,11 +193,17 @@ if($ticket->isOverdue())
         <div class="flush-left">
              <h2><a href="tickets.php?id=<?php echo $ticket->getId(); ?>"
              title="<?php echo __('Reload'); ?>"><i class="icon-refresh"></i>
-             <?php echo sprintf(__('Ticket #%s'), $ticket->getNumber()); ?></a></h2>
+             <?php echo sprintf(__('Ticket #%s'), $ticket->getNumber()); ?></a>
+            </h2>
         </div>
     </div>
   </div>
 </div>
+<div class="clear tixTitle has_bottom_border">
+    <h3>
+    <?php echo Format::htmlchars($ticket->getSubject()); ?>
+    </h3>
+</div>
 <table class="ticket_info" cellspacing="0" cellpadding="0" width="940" border="0">
     <tr>
         <td width="50%">
@@ -401,9 +407,7 @@ if($ticket->isOverdue())
     </tr>
 </table>
 <br>
-<table class="ticket_info" cellspacing="0" cellpadding="0" width="940" border="0">
 <?php
-$idx = 0;
 foreach (DynamicFormEntry::forTicket($ticket->getId()) as $form) {
     // Skip core fields shown earlier in the ticket view
     // TODO: Rewrite getAnswers() so that one could write
@@ -413,32 +417,38 @@ foreach (DynamicFormEntry::forTicket($ticket->getId()) as $form) {
         'field__flags__hasbit' => DynamicFormField::FLAG_EXT_STORED,
         'field__name__in' => array('subject', 'priority')
     )));
-    if (count($answers) == 0)
+    $displayed = array();
+    foreach($answers as $a) {
+        if (!($v = $a->display()))
+            continue;
+        $displayed[] = array($a->getLocal('label'), $v);
+    }
+    if (count($displayed) == 0)
         continue;
     ?>
+    <table class="ticket_info custom-data" cellspacing="0" cellpadding="0" width="940" border="0">
+    <thead>
+        <th colspan="2"><?php echo Format::htmlchars($form->getTitle()); ?></th>
+    </thead>
+    <tbody>
+<?php
+    foreach ($displayed as $stuff) {
+        list($label, $v) = $stuff;
+?>
         <tr>
-        <td colspan="2">
-            <table cellspacing="0" cellpadding="4" width="100%" border="0">
-            <?php foreach($answers as $a) {
-                if (!($v = $a->display())) continue; ?>
-                <tr>
-                    <th width="100"><?php
-    echo $a->getLocal('label');
-                    ?>:</th>
-                    <td><?php
-    echo $v;
-                    ?></td>
-                </tr>
-                <?php } ?>
-            </table>
-        </td>
+            <td width="200"><?php
+echo Format::htmlchars($label);
+            ?>:</th>
+            <td><?php
+echo $v;
+            ?></td>
         </tr>
-    <?php
-    $idx++;
-    } ?>
-</table>
+<?php } ?>
+    </tbody>
+    </table>
+<?php } ?>
 <div class="clear"></div>
-<h2 style="padding:10px 0 5px 0; font-size:11pt;"><?php echo Format::htmlchars($ticket->getSubject()); ?></h2>
+
 <?php
 $tcount = $ticket->getThreadEntries($types)->count();
 ?>
@@ -670,7 +680,7 @@ $tcount = $ticket->getThreadEntries($types)->count();
             </tr>
          </tbody>
         </table>
-        <p  style="padding:0 165px;">
+        <p  style="text-align:center;">
             <input class="save pending" type="submit" value="<?php echo __('Post Reply');?>">
             <input class="" type="reset" value="<?php echo __('Reset');?>">
         </p>
@@ -757,7 +767,7 @@ $tcount = $ticket->getThreadEntries($types)->count();
             </tr>
         </table>
 
-       <p  style="padding-left:165px;">
+       <p style="text-align:center;">
            <input class="save pending" type="submit" value="<?php echo __('Post Note');?>">
            <input class="" type="reset" value="<?php echo __('Reset');?>">
        </p>
diff --git a/include/staff/tickets.inc.php b/include/staff/tickets.inc.php
index 8438ac2d4b844650e964619c1ae612f6a79f97a7..7ec261761af5562bc1014a2f945440b2814df0c5 100644
--- a/include/staff/tickets.inc.php
+++ b/include/staff/tickets.inc.php
@@ -115,7 +115,7 @@ case 'search':
         $tickets = $search->mangleQuerySet($tickets, $form);
         $view_all_tickets = $thisstaff->hasPerm(SearchBackend::PERM_EVERYTHING);
         $results_type=__('Advanced Search')
-            . '<a class="action-button" href="?clear_filter"><i style="top:0" class="icon-ban-circle"></i> <em>' . __('clear') . '</em></a>';
+            . '<a class="action-button" style="font-size: 15px;" href="?clear_filter"><i style="top:0" class="icon-ban-circle"></i> <em>' . __('clear') . '</em></a>';
         foreach ($form->getFields() as $sf) {
             if ($sf->get('name') == 'keywords' && $sf->getClean()) {
                 $has_relevance = true;
@@ -353,19 +353,20 @@ return false;">
 </div>
 <!-- SEARCH FORM END -->
 <div class="clear"></div>
-<div style="margin-bottom:20px; padding-top:10px;">
-<div class="sticky bar opaque">
-    <div class="content">
-        <div class="pull-left flush-left">
-            <h2><a href="<?php echo $refresh_url; ?>"
-                title="<?php echo __('Refresh'); ?>"><i class="icon-refresh"></i> <?php echo
-                $results_type; ?></a></h2>
-        </div>
-        <div class="pull-right flush-right">
+<div style="margin-bottom:20px; padding-top:5px;">
+    <div class="sticky bar opaque">
+        <div class="content">
+            <div class="pull-left flush-left">
+                <h2><a href="<?php echo $refresh_url; ?>"
+                    title="<?php echo __('Refresh'); ?>"><i class="icon-refresh"></i> <?php echo
+                    $results_type; ?></a></h2>
+            </div>
+            <div class="pull-right flush-right">
             <?php
             if ($count) {
                 Ticket::agentActions($thisstaff, array('status' => $status));
             }?>
+            </div>
         </div>
     </div>
 </div>
@@ -380,23 +381,23 @@ return false;">
     <thead>
         <tr>
             <?php if ($thisstaff->canManageTickets()) { ?>
-	        <th width="12px">&nbsp;</th>
+	        <th width="2%">&nbsp;</th>
             <?php } ?>
-	        <th width="70">
+	        <th width="7.4%">
                 <?php echo __('Ticket'); ?></th>
-	        <th width="100">
+	        <th width="14.6%">
                 <?php echo $date_header ?: __('Date Created'); ?></th>
-	        <th width="280">
+	        <th width="29.8%">
                 <?php echo __('Subject'); ?></th>
-            <th width="170">
+            <th width="18.1%">
                 <?php echo __('From');?></th>
             <?php
             if($search && !$status) { ?>
-                <th width="60">
+                <th width="8.4%">
                     <?php echo __('Status');?></th>
             <?php
             } else { ?>
-                <th width="60" <?php echo $pri_sort;?>>
+                <th width="8.4%" <?php echo $pri_sort;?>>
                     <?php echo __('Priority');?></th>
             <?php
             }
@@ -404,16 +405,16 @@ return false;">
             if($showassigned ) {
                 //Closed by
                 if(!strcasecmp($status,'closed')) { ?>
-                    <th width="150">
+                    <th width="16%">
                         <?php echo __('Closed By'); ?></th>
                 <?php
                 } else { //assigned to ?>
-                    <th width="150">
+                    <th width="16%">
                         <?php echo __('Assigned To'); ?></th>
                 <?php
                 }
             } else { ?>
-                <th width="150">
+                <th width="16%">
                     <?php echo __('Department');?></th>
             <?php
             } ?>
@@ -513,7 +514,7 @@ return false;">
                 <?php
                 }
                 ?>
-                <td nowrap><span class="truncate" style="max-width: 150px"><?php
+                <td nowrap><span class="truncate" style="max-width: 169px"><?php
                     echo Format::htmlchars($lc); ?></span></td>
             </tr>
             <?php
diff --git a/include/staff/tpl.inc.php b/include/staff/tpl.inc.php
index 70c9e90b44f6ae456df72c9816992d9a6e881624..7f0839f8b8e05538f66d04e0eaaf4d135280d165 100644
--- a/include/staff/tpl.inc.php
+++ b/include/staff/tpl.inc.php
@@ -35,13 +35,10 @@ $tpl=$msgtemplates[$selected];
 
 ?>
 <form method="get" action="templates.php?">
-<h2><span><?php echo __('Email Template Set');
-    ?> &nbsp;/&nbsp; <span><a href="templates.php?tpl_id=<?php echo $tpl_id; ?>"><?php echo $name; ?></a>
-    <input type="hidden" name="a" value="manage">
-    <input type="hidden" name="tpl_id" value="<?php echo $tpl_id; ?>">
+<h2>
 <div class="pull-right">
     <span style="font-size:10pt"><?php echo __('Viewing'); ?>:</span>
-    <select id="tpl_options" name="id" style="width:300px;">
+    <select id="tpl_options" name="id" style="width:250px;">
         <option value="">&mdash; <?php echo __('Select Setting Group'); ?> &mdash;</option>
         <?php
         $impl = $group->getTemplates();
@@ -70,9 +67,13 @@ $tpl=$msgtemplates[$selected];
             echo "</optgroup>";
         ?>
     </select>
-    <input type="submit" value="Go">
     </div>
+
+    <span><?php echo __('Email Template Set'); ?></span>
+    <small> — <a href="templates.php?tpl_id=<?php echo $tpl_id; ?>"><?php echo $name; ?></a></small>
 </h2>
+    <input type="hidden" name="a" value="manage">
+    <input type="hidden" name="tpl_id" value="<?php echo $tpl_id; ?>">
 </form>
 <hr/>
 <form action="templates.php?id=<?php echo $id; ?>&amp;a=manage" method="post" id="save">
diff --git a/include/staff/user-view.inc.php b/include/staff/user-view.inc.php
index 4d02b3d66d166a9be7965ace9e6cdeab3ff9a72c..9299e4e83c20719c547f91fc404fe1983494f17a 100644
--- a/include/staff/user-view.inc.php
+++ b/include/staff/user-view.inc.php
@@ -21,7 +21,7 @@ $org = $user->getOrganization();
             </span>
 <?php }
     if ($thisstaff->hasPerm(User::PERM_DELETE)) { ?>
-            <a id="user-delete" class="action-button pull-right user-action"
+            <a id="user-delete" class="red button action-button pull-right user-action"
             href="#users/<?php echo $user->getId(); ?>/delete"><i class="icon-trash"></i>
             <?php echo __('Delete User'); ?></a>
 <?php } ?>
@@ -95,9 +95,9 @@ if ($thisstaff->hasPerm(User::PERM_EDIT)) { ?>
 <?php }
                     echo Format::htmlchars($user->getName()->getOriginal());
 if ($thisstaff->hasPerm(User::PERM_EDIT)) { ?>
-                    </a>
+                        </a></b>
 <?php } ?>
-</td>
+                    </td>
                 </tr>
                 <tr>
                     <th><?php echo __('Email'); ?>:</th>
diff --git a/include/staff/users.inc.php b/include/staff/users.inc.php
index 1632f0f2091d7c2123c35266457447fbb7ce53cd..b6980f5c6b1fcfdacaff9035fad060f395127ba8 100644
--- a/include/staff/users.inc.php
+++ b/include/staff/users.inc.php
@@ -56,74 +56,83 @@ $users->values('id', 'name', 'default_email__address', 'account__id',
     'account__status', 'created', 'updated');
 $users->order_by($order . $order_column);
 ?>
-<h2><?php echo __('User Directory'); ?></h2>
-<div class="pull-left">
-    <form action="users.php" method="get">
-        <?php csrf_token(); ?>
-        <input type="hidden" name="a" value="search">
-        <table>
-            <tr>
-                <td><input type="search" id="basic-user-search" name="query"
-                    autofocus size="30" value="<?php echo Format::htmlchars($_REQUEST['query']); ?>"
-                    autocomplete="off" autocorrect="off" autocapitalize="off"></td>
-                <td><input type="submit" name="basic_search" class="button" value="<?php echo __('Search'); ?>"></td>
-                <!-- <td>&nbsp;&nbsp;<a href="" id="advanced-user-search">[advanced]</a></td> -->
-            </tr>
-        </table>
-    </form>
+<div id="basic_search">
+    <div style="min-height:25px;">
+        <form action="users.php" method="get">
+            <?php csrf_token(); ?>
+            <input type="hidden" name="a" value="search">
+            <div class="attached input">
+                <input type="search" class="basic-search" id="basic-user-search" name="query"
+                         size="30" value="<?php echo Format::htmlchars($_REQUEST['query']); ?>"
+                        autocomplete="off" autocorrect="off" autocapitalize="off">
+            <!-- <td>&nbsp;&nbsp;<a href="" id="advanced-user-search">[advanced]</a></td> -->
+                <button type="submit" class="attached button"><i class="icon-search"></i>
+                </button>
+            </div>
+        </form>
+    </div>
  </div>
+<form id="users-list" action="users.php" method="POST" name="staff" >
 
-<div class="pull-right">
-<?php if ($thisstaff->hasPerm(User::PERM_CREATE)) { ?>
-    <a class="green button action-button popup-dialog"
-        href="#users/add">
-        <i class="icon-plus-sign"></i>
-        <?php echo __('Add User'); ?>
-    </a>
-    <a class="action-button popup-dialog"
-        href="#users/import">
-        <i class="icon-upload"></i>
-        <?php echo __('Import'); ?>
-    </a>
-<?php } ?>
-    <span class="action-button" data-dropdown="#action-dropdown-more"
-        style="/*DELME*/ vertical-align:top; margin-bottom:0">
-        <i class="icon-caret-down pull-right"></i>
-        <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
-    </span>
-    <div id="action-dropdown-more" class="action-dropdown anchor-right">
-        <ul>
-<?php if ($thisstaff->hasPerm(User::PERM_EDIT)) { ?>
-            <li><a href="#add-to-org" class="users-action">
-                <i class="icon-group icon-fixed-width"></i>
-                <?php echo __('Add to Organization'); ?></a></li>
-<?php
-}
-if ('disabled' != $cfg->getClientRegistrationMode()) { ?>
-            <li><a class="users-action" href="#reset">
-                <i class="icon-envelope icon-fixed-width"></i>
-                <?php echo __('Send Password Reset Email'); ?></a></li>
-<?php if ($thisstaff->hasPerm(User::PERM_MANAGE)) { ?>
-            <li><a class="users-action" href="#register">
-                <i class="icon-smile icon-fixed-width"></i>
-                <?php echo __('Register'); ?></a></li>
-            <li><a class="users-action" href="#lock">
-                <i class="icon-lock icon-fixed-width"></i>
-                <?php echo __('Lock'); ?></a></li>
-            <li><a class="users-action" href="#unlock">
-                <i class="icon-unlock icon-fixed-width"></i>
-                <?php echo __('Unlock'); ?></a></li>
-<?php }
-if ($thisstaff->hasPerm(User::PERM_DELETE)) { ?>
-            <li class="danger"><a class="users-action" href="#delete">
-                <i class="icon-trash icon-fixed-width"></i>
-                <?php echo __('Delete'); ?></a></li>
-<?php }
-} # end of registration-enabled? ?>
-        </ul>
+<div style="margin-bottom:20px; padding-top:5px;">
+    <div class="sticky bar opaque">
+        <div class="content">
+            <div class="pull-left flush-left">
+                <h2><?php echo __('User Directory'); ?></h2>
+            </div>
+            <div class="pull-right">
+                <?php if ($thisstaff->hasPerm(User::PERM_CREATE)) { ?>
+                <a class="green button action-button popup-dialog"
+                   href="#users/add">
+                    <i class="icon-plus-sign"></i>
+                    <?php echo __('Add User'); ?>
+                </a>
+                <a class="action-button popup-dialog"
+                   href="#users/import">
+                    <i class="icon-upload"></i>
+                    <?php echo __('Import'); ?>
+                </a>
+                <?php } ?>
+                <span class="action-button" data-dropdown="#action-dropdown-more"
+                      style="/*DELME*/ vertical-align:top; margin-bottom:0">
+                    <i class="icon-caret-down pull-right"></i>
+                    <span ><i class="icon-cog"></i> <?php echo __('More');?></span>
+                </span>
+                <div id="action-dropdown-more" class="action-dropdown anchor-right">
+                    <ul>
+                        <?php if ($thisstaff->hasPerm(User::PERM_EDIT)) { ?>
+                        <li><a href="#add-to-org" class="users-action">
+                            <i class="icon-group icon-fixed-width"></i>
+                            <?php echo __('Add to Organization'); ?></a></li>
+                        <?php
+                            }
+                        if ('disabled' != $cfg->getClientRegistrationMode()) { ?>
+                        <li><a class="users-action" href="#reset">
+                            <i class="icon-envelope icon-fixed-width"></i>
+                            <?php echo __('Send Password Reset Email'); ?></a></li>
+                        <?php if ($thisstaff->hasPerm(User::PERM_MANAGE)) { ?>
+                        <li><a class="users-action" href="#register">
+                            <i class="icon-smile icon-fixed-width"></i>
+                            <?php echo __('Register'); ?></a></li>
+                        <li><a class="users-action" href="#lock">
+                            <i class="icon-lock icon-fixed-width"></i>
+                            <?php echo __('Lock'); ?></a></li>
+                        <li><a class="users-action" href="#unlock">
+                            <i class="icon-unlock icon-fixed-width"></i>
+                            <?php echo __('Unlock'); ?></a></li>
+                        <?php }
+                        if ($thisstaff->hasPerm(User::PERM_DELETE)) { ?>
+                        <li class="danger"><a class="users-action" href="#delete">
+                            <i class="icon-trash icon-fixed-width"></i>
+                            <?php echo __('Delete'); ?></a></li>
+                        <?php }
+                        } # end of registration-enabled? ?>
+                    </ul>
+                </div>
+            </div>
+        </div>
     </div>
 </div>
-
 <div class="clear"></div>
 <?php
 $showing = $search ? __('Search Results').': ' : '';
@@ -132,24 +141,22 @@ if($users->exists(true))
 else
     $showing .= __('No users found!');
 ?>
-<form id="users-list" action="users.php" method="POST" name="staff" >
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="mass_process" >
  <input type="hidden" id="action" name="a" value="" >
  <input type="hidden" id="selected-count" name="count" value="" >
  <input type="hidden" id="org_id" name="org_id" value="" >
  <table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
-    <caption><?php echo $showing; ?></caption>
     <thead>
         <tr>
-            <th nowrap width="12"> </th>
-            <th width="350"><a <?php echo $name_sort; ?> href="users.php?<?php
+            <th nowrap width="4%">&nbsp;</th>
+            <th width="45%"><a <?php echo $name_sort; ?> href="users.php?<?php
                 echo $qstr; ?>&sort=name"><?php echo __('Name'); ?></a></th>
-            <th width="250"><a  <?php echo $status_sort; ?> href="users.php?<?php
+            <th width="11%"><a  <?php echo $status_sort; ?> href="users.php?<?php
                 echo $qstr; ?>&sort=status"><?php echo __('Status'); ?></a></th>
-            <th width="100"><a <?php echo $create_sort; ?> href="users.php?<?php
+            <th width="20%"><a <?php echo $create_sort; ?> href="users.php?<?php
                 echo $qstr; ?>&sort=create"><?php echo __('Created'); ?></a></th>
-            <th width="145"><a <?php echo $update_sort; ?> href="users.php?<?php
+            <th width="20%"><a <?php echo $update_sort; ?> href="users.php?<?php
                 echo $qstr; ?>&sort=update"><?php echo __('Updated'); ?></a></th>
         </tr>
     </thead>
@@ -174,7 +181,7 @@ else
                     $sel=true;
                 ?>
                <tr id="<?php echo $U['id']; ?>">
-                <td nowrap>
+                <td nowrap align="center">
                     <input type="checkbox" value="<?php echo $U['id']; ?>" class="ckb mass nowarn"/>
                 </td>
                 <td>&nbsp;
diff --git a/scp/css/bootstrap.css b/scp/css/bootstrap.css
deleted file mode 100644
index 7a02fb748814898548e67f60e34185991712de67..0000000000000000000000000000000000000000
--- a/scp/css/bootstrap.css
+++ /dev/null
@@ -1,1589 +0,0 @@
-/*!
- * Bootstrap v2.0.4
- *
- * Copyright 2012 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
- */
-.clearfix {
-  *zoom: 1;
-}
-.clearfix:before,
-.clearfix:after {
-  display: table;
-  content: "";
-}
-.clearfix:after {
-  clear: both;
-}
-.hide-text {
-  font: 0/0 a;
-  color: transparent;
-  text-shadow: none;
-  background-color: transparent;
-  border: 0;
-}
-.input-block-level {
-  display: block;
-  width: 100%;
-  min-height: 28px;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  -ms-box-sizing: border-box;
-  box-sizing: border-box;
-}
-p {
-  margin: 0 0 9px;
-}
-p small {
-  font-size: 11px;
-  color: #999999;
-}
-.lead {
-  margin-bottom: 18px;
-  font-size: 20px;
-  font-weight: 200;
-  line-height: 27px;
-}
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
-  margin: 0;
-  font-family: inherit;
-  font-weight: bold;
-  color: inherit;
-  text-rendering: optimizelegibility;
-}
-h1 small,
-h2 small,
-h3 small,
-h4 small,
-h5 small,
-h6 small {
-  font-weight: normal;
-  color: #999999;
-}
-h1 {
-  font-size: 30px;
-  line-height: 36px;
-}
-h1 small {
-  font-size: 18px;
-}
-h2 {
-  font-size: 24px;
-  line-height: 36px;
-}
-h2 small {
-  font-size: 18px;
-}
-h3 {
-  font-size: 18px;
-  line-height: 27px;
-}
-h3 small {
-  font-size: 14px;
-}
-h4,
-h5,
-h6 {
-  line-height: 18px;
-}
-h4 {
-  font-size: 14px;
-}
-h4 small {
-  font-size: 12px;
-}
-h5 {
-  font-size: 12px;
-}
-h6 {
-  font-size: 11px;
-  color: #999999;
-  text-transform: uppercase;
-}
-.page-header {
-  padding-bottom: 17px;
-  margin: 18px 0;
-  border-bottom: 1px solid #eeeeee;
-}
-.page-header h1 {
-  line-height: 1;
-}
-ul,
-ol {
-  padding: 0;
-  margin: 0 0 9px 25px;
-}
-ul ul,
-ul ol,
-ol ol,
-ol ul {
-  margin-bottom: 0;
-}
-ul {
-  list-style: disc;
-}
-ol {
-  list-style: decimal;
-}
-/*li {
-  line-height: 18px;
-}*/
-ul.unstyled,
-ol.unstyled {
-  margin-left: 0;
-  list-style: none;
-}
-dl {
-  margin-bottom: 18px;
-}
-dt,
-dd {
-  line-height: 18px;
-}
-dt {
-  font-weight: bold;
-  line-height: 17px;
-}
-dd {
-  margin-left: 9px;
-}
-.dl-horizontal dt {
-  float: left;
-  width: 120px;
-  clear: left;
-  text-align: right;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-}
-.dl-horizontal dd {
-  margin-left: 130px;
-}
-hr {
-  margin: 18px 0;
-  border: 0;
-  border-top: 1px solid #eeeeee;
-  border-bottom: 1px solid #ffffff;
-}
-strong {
-  font-weight: bold;
-}
-em {
-  font-style: italic;
-}
-.muted {
-  color: #999999;
-}
-abbr[title] {
-  cursor: help;
-  border-bottom: 1px dotted #999999;
-}
-abbr.initialism {
-  font-size: 90%;
-  text-transform: uppercase;
-}
-blockquote {
-  padding: 0 0 0 15px;
-  margin: 0 0 18px;
-  border-left: 5px solid #eeeeee;
-}
-blockquote p {
-  margin-bottom: 0;
-  font-size: 16px;
-  font-weight: 300;
-  line-height: 22.5px;
-}
-blockquote small {
-  display: block;
-  line-height: 18px;
-  color: #999999;
-}
-blockquote small:before {
-  content: '\2014 \00A0';
-}
-blockquote.pull-right {
-  float: right;
-  padding-right: 15px;
-  padding-left: 0;
-  border-right: 5px solid #eeeeee;
-  border-left: 0;
-}
-blockquote.pull-right p,
-blockquote.pull-right small {
-  text-align: right;
-}
-q:before,
-q:after,
-blockquote:before,
-blockquote:after {
-  content: "";
-}
-address {
-  display: block;
-  margin-bottom: 18px;
-  font-style: normal;
-  line-height: 18px;
-}
-small {
-  font-size: 100%;
-}
-cite {
-  font-style: normal;
-}
-.label,
-.badge {
-  font-size: 10.998px;
-  font-weight: bold;
-  line-height: 14px;
-  color: #ffffff;
-  vertical-align: baseline;
-  white-space: nowrap;
-  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-  background-color: #999999;
-}
-.label {
-  padding: 1px 4px 2px;
-  -webkit-border-radius: 3px;
-  -moz-border-radius: 3px;
-  border-radius: 3px;
-}
-.badge {
-  padding: 1px 9px 2px;
-  -webkit-border-radius: 9px;
-  -moz-border-radius: 9px;
-  border-radius: 9px;
-}
-a.label:hover,
-a.badge:hover {
-  color: #ffffff;
-  text-decoration: none;
-  cursor: pointer;
-}
-.label-important,
-.badge-important {
-  background-color: #b94a48;
-}
-.label-important[href],
-.badge-important[href] {
-  background-color: #953b39;
-}
-.label-warning,
-.badge-warning {
-  background-color: #f89406;
-}
-.label-warning[href],
-.badge-warning[href] {
-  background-color: #c67605;
-}
-.label-success,
-.badge-success {
-  background-color: #468847;
-}
-.label-success[href],
-.badge-success[href] {
-  background-color: #356635;
-}
-.label-info,
-.badge-info {
-  background-color: #3a87ad;
-}
-.label-info[href],
-.badge-info[href] {
-  background-color: #2d6987;
-}
-.label-inverse,
-.badge-inverse {
-  background-color: #333333;
-}
-.label-inverse[href],
-.badge-inverse[href] {
-  background-color: #1a1a1a;
-}
-table {
-  max-width: 100%;
-  background-color: transparent;
-  border-collapse: collapse;
-  border-spacing: 0;
-}
-.table {
-  width: 100%;
-  margin-bottom: 18px;
-}
-.table th,
-.table td {
-  padding: 8px;
-  line-height: 18px;
-  text-align: left;
-  vertical-align: top;
-  border-top: 1px solid #dddddd;
-}
-.table th {
-  font-weight: bold;
-}
-.table thead th {
-  vertical-align: bottom;
-}
-.table caption + thead tr:first-child th,
-.table caption + thead tr:first-child td,
-.table colgroup + thead tr:first-child th,
-.table colgroup + thead tr:first-child td,
-.table thead:first-child tr:first-child th,
-.table thead:first-child tr:first-child td {
-  border-top: 0;
-}
-.table tbody + tbody {
-  border-top: 2px solid #dddddd;
-}
-.table-condensed th,
-.table-condensed td {
-  padding: 4px 5px;
-}
-.table-bordered {
-  border: 1px solid #dddddd;
-  border-collapse: separate;
-  *border-collapse: collapsed;
-  border-left: 0;
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  border-radius: 4px;
-}
-.table-bordered th,
-.table-bordered td {
-  border-left: 1px solid #dddddd;
-}
-.table-bordered caption + thead tr:first-child th,
-.table-bordered caption + tbody tr:first-child th,
-.table-bordered caption + tbody tr:first-child td,
-.table-bordered colgroup + thead tr:first-child th,
-.table-bordered colgroup + tbody tr:first-child th,
-.table-bordered colgroup + tbody tr:first-child td,
-.table-bordered thead:first-child tr:first-child th,
-.table-bordered tbody:first-child tr:first-child th,
-.table-bordered tbody:first-child tr:first-child td {
-  border-top: 0;
-}
-.table-bordered thead:first-child tr:first-child th:first-child,
-.table-bordered tbody:first-child tr:first-child td:first-child {
-  -webkit-border-top-left-radius: 4px;
-  border-top-left-radius: 4px;
-  -moz-border-radius-topleft: 4px;
-}
-.table-bordered thead:first-child tr:first-child th:last-child,
-.table-bordered tbody:first-child tr:first-child td:last-child {
-  -webkit-border-top-right-radius: 4px;
-  border-top-right-radius: 4px;
-  -moz-border-radius-topright: 4px;
-}
-.table-bordered thead:last-child tr:last-child th:first-child,
-.table-bordered tbody:last-child tr:last-child td:first-child {
-  -webkit-border-radius: 0 0 0 4px;
-  -moz-border-radius: 0 0 0 4px;
-  border-radius: 0 0 0 4px;
-  -webkit-border-bottom-left-radius: 4px;
-  border-bottom-left-radius: 4px;
-  -moz-border-radius-bottomleft: 4px;
-}
-.table-bordered thead:last-child tr:last-child th:last-child,
-.table-bordered tbody:last-child tr:last-child td:last-child {
-  -webkit-border-bottom-right-radius: 4px;
-  border-bottom-right-radius: 4px;
-  -moz-border-radius-bottomright: 4px;
-}
-.table-striped tbody tr:nth-child(odd) td,
-.table-striped tbody tr:nth-child(odd) th {
-  background-color: #f9f9f9;
-}
-.table tbody tr:hover td,
-.table tbody tr:hover th {
-  background-color: #f5f5f5;
-}
-table .span1 {
-  float: none;
-  width: 44px;
-  margin-left: 0;
-}
-table .span2 {
-  float: none;
-  width: 124px;
-  margin-left: 0;
-}
-table .span3 {
-  float: none;
-  width: 204px;
-  margin-left: 0;
-}
-table .span4 {
-  float: none;
-  width: 284px;
-  margin-left: 0;
-}
-table .span5 {
-  float: none;
-  width: 364px;
-  margin-left: 0;
-}
-table .span6 {
-  float: none;
-  width: 444px;
-  margin-left: 0;
-}
-table .span7 {
-  float: none;
-  width: 524px;
-  margin-left: 0;
-}
-table .span8 {
-  float: none;
-  width: 604px;
-  margin-left: 0;
-}
-table .span9 {
-  float: none;
-  width: 684px;
-  margin-left: 0;
-}
-table .span10 {
-  float: none;
-  width: 764px;
-  margin-left: 0;
-}
-table .span11 {
-  float: none;
-  width: 844px;
-  margin-left: 0;
-}
-table .span12 {
-  float: none;
-  width: 924px;
-  margin-left: 0;
-}
-table .span13 {
-  float: none;
-  width: 1004px;
-  margin-left: 0;
-}
-table .span14 {
-  float: none;
-  width: 1084px;
-  margin-left: 0;
-}
-table .span15 {
-  float: none;
-  width: 1164px;
-  margin-left: 0;
-}
-table .span16 {
-  float: none;
-  width: 1244px;
-  margin-left: 0;
-}
-table .span17 {
-  float: none;
-  width: 1324px;
-  margin-left: 0;
-}
-table .span18 {
-  float: none;
-  width: 1404px;
-  margin-left: 0;
-}
-table .span19 {
-  float: none;
-  width: 1484px;
-  margin-left: 0;
-}
-table .span20 {
-  float: none;
-  width: 1564px;
-  margin-left: 0;
-}
-table .span21 {
-  float: none;
-  width: 1644px;
-  margin-left: 0;
-}
-table .span22 {
-  float: none;
-  width: 1724px;
-  margin-left: 0;
-}
-table .span23 {
-  float: none;
-  width: 1804px;
-  margin-left: 0;
-}
-table .span24 {
-  float: none;
-  width: 1884px;
-  margin-left: 0;
-}
-form {
-  margin: 0 0 18px;
-}
-fieldset {
-  padding: 0;
-  margin: 0;
-  border: 0;
-}
-legend {
-  display: block;
-  width: 100%;
-  padding: 0;
-  margin-bottom: 27px;
-  font-size: 19.5px;
-  line-height: 36px;
-  color: #333333;
-  border: 0;
-  border-bottom: 1px solid #e5e5e5;
-}
-legend small {
-  font-size: 13.5px;
-  color: #999999;
-}
-label,
-input,
-button,
-select,
-textarea {
-  font-size: 13px;
-  font-weight: normal;
-  line-height: 18px;
-}
-input,
-button,
-select,
-textarea {
-  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-}
-label {
-  display: block;
-  margin-bottom: 5px;
-}
-select,
-textarea,
-input[type="text"],
-input[type="password"],
-input[type="datetime"],
-input[type="datetime-local"],
-input[type="date"],
-input[type="month"],
-input[type="time"],
-input[type="week"],
-input[type="number"],
-input[type="email"],
-input[type="url"],
-input[type="search"],
-input[type="tel"],
-input[type="color"],
-.uneditable-input {
-  display: inline-block;
-  height: 18px;
-  padding: 4px;
-  margin-bottom: 9px;
-  font-size: 13px;
-  line-height: 18px;
-  color: #555555;
-}
-input,
-textarea {
-  width: 210px;
-}
-textarea {
-  height: auto;
-}
-textarea,
-input[type="text"],
-input[type="password"],
-input[type="datetime"],
-input[type="datetime-local"],
-input[type="date"],
-input[type="month"],
-input[type="time"],
-input[type="week"],
-input[type="number"],
-input[type="email"],
-input[type="url"],
-input[type="search"],
-input[type="tel"],
-input[type="color"],
-.uneditable-input {
-  background-color: #ffffff;
-  border: 1px solid #cccccc;
-  -webkit-border-radius: 3px;
-  -moz-border-radius: 3px;
-  border-radius: 3px;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-  -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
-  -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
-  -ms-transition: border linear 0.2s, box-shadow linear 0.2s;
-  -o-transition: border linear 0.2s, box-shadow linear 0.2s;
-  transition: border linear 0.2s, box-shadow linear 0.2s;
-}
-textarea:focus,
-input[type="text"]:focus,
-input[type="password"]:focus,
-input[type="datetime"]:focus,
-input[type="datetime-local"]:focus,
-input[type="date"]:focus,
-input[type="month"]:focus,
-input[type="time"]:focus,
-input[type="week"]:focus,
-input[type="number"]:focus,
-input[type="email"]:focus,
-input[type="url"]:focus,
-input[type="search"]:focus,
-input[type="tel"]:focus,
-input[type="color"]:focus,
-.uneditable-input:focus {
-  border-color: rgba(82, 168, 236, 0.8);
-  outline: 0;
-  outline: thin dotted \9;
-  /* IE6-9 */
-
-  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
-  -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
-  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
-}
-input[type="radio"],
-input[type="checkbox"] {
-  margin: 3px 0;
-  *margin-top: 0;
-  /* IE7 */
-
-  line-height: normal;
-  cursor: pointer;
-}
-input[type="submit"],
-input[type="reset"],
-input[type="button"],
-input[type="radio"],
-input[type="checkbox"] {
-  width: auto;
-}
-.uneditable-textarea {
-  width: auto;
-  height: auto;
-}
-select,
-input[type="file"] {
-  height: 28px;
-  /* In IE7, the height of the select element cannot be changed by height, only font-size */
-
-  *margin-top: 4px;
-  /* For IE7, add top margin to align select with labels */
-
-  line-height: 28px;
-}
-select {
-  width: 220px;
-  border: 1px solid #bbb;
-}
-select[multiple],
-select[size] {
-  height: auto;
-}
-select:focus,
-input[type="file"]:focus,
-input[type="radio"]:focus,
-input[type="checkbox"]:focus {
-  outline: thin dotted #333;
-  outline: 5px auto -webkit-focus-ring-color;
-  outline-offset: -2px;
-}
-.radio,
-.checkbox {
-  min-height: 18px;
-  padding-left: 18px;
-}
-.radio input[type="radio"],
-.checkbox input[type="checkbox"] {
-  float: left;
-  margin-left: -18px;
-}
-.controls > .radio:first-child,
-.controls > .checkbox:first-child {
-  padding-top: 5px;
-}
-.radio.inline,
-.checkbox.inline {
-  display: inline-block;
-  padding-top: 5px;
-  margin-bottom: 0;
-  vertical-align: middle;
-}
-.radio.inline + .radio.inline,
-.checkbox.inline + .checkbox.inline {
-  margin-left: 10px;
-}
-.input-mini {
-  width: 60px;
-}
-.input-small {
-  width: 90px;
-}
-.input-medium {
-  width: 150px;
-}
-.input-large {
-  width: 210px;
-}
-.input-xlarge {
-  width: 270px;
-}
-.input-xxlarge {
-  width: 530px;
-}
-input[class*="span"],
-select[class*="span"],
-textarea[class*="span"],
-.uneditable-input[class*="span"],
-.row-fluid input[class*="span"],
-.row-fluid select[class*="span"],
-.row-fluid textarea[class*="span"],
-.row-fluid .uneditable-input[class*="span"] {
-  float: none;
-  margin-left: 0;
-}
-.input-append input[class*="span"],
-.input-append .uneditable-input[class*="span"],
-.input-prepend input[class*="span"],
-.input-prepend .uneditable-input[class*="span"],
-.row-fluid .input-prepend [class*="span"],
-.row-fluid .input-append [class*="span"] {
-  display: inline-block;
-}
-input,
-textarea,
-.uneditable-input {
-  margin-left: 0;
-}
-input.span12, textarea.span12, .uneditable-input.span12 {
-  width: 930px;
-}
-input.span11, textarea.span11, .uneditable-input.span11 {
-  width: 850px;
-}
-input.span10, textarea.span10, .uneditable-input.span10 {
-  width: 770px;
-}
-input.span9, textarea.span9, .uneditable-input.span9 {
-  width: 690px;
-}
-input.span8, textarea.span8, .uneditable-input.span8 {
-  width: 610px;
-}
-input.span7, textarea.span7, .uneditable-input.span7 {
-  width: 530px;
-}
-input.span6, textarea.span6, .uneditable-input.span6 {
-  width: 450px;
-}
-input.span5, textarea.span5, .uneditable-input.span5 {
-  width: 370px;
-}
-input.span4, textarea.span4, .uneditable-input.span4 {
-  width: 290px;
-}
-input.span3, textarea.span3, .uneditable-input.span3 {
-  width: 210px;
-}
-input.span2, textarea.span2, .uneditable-input.span2 {
-  width: 130px;
-}
-input.span1, textarea.span1, .uneditable-input.span1 {
-  width: 50px;
-}
-input[disabled],
-select[disabled],
-textarea[disabled],
-input[readonly],
-select[readonly],
-textarea[readonly] {
-  cursor: not-allowed;
-  background-color: #eeeeee;
-  border-color: #ddd;
-}
-input[type="radio"][disabled],
-input[type="checkbox"][disabled],
-input[type="radio"][readonly],
-input[type="checkbox"][readonly] {
-  background-color: transparent;
-}
-.control-group.warning > label,
-.control-group.warning .help-block,
-.control-group.warning .help-inline {
-  color: #c09853;
-}
-.control-group.warning .checkbox,
-.control-group.warning .radio,
-.control-group.warning input,
-.control-group.warning select,
-.control-group.warning textarea {
-  color: #c09853;
-  border-color: #c09853;
-}
-.control-group.warning .checkbox:focus,
-.control-group.warning .radio:focus,
-.control-group.warning input:focus,
-.control-group.warning select:focus,
-.control-group.warning textarea:focus {
-  border-color: #a47e3c;
-  -webkit-box-shadow: 0 0 6px #dbc59e;
-  -moz-box-shadow: 0 0 6px #dbc59e;
-  box-shadow: 0 0 6px #dbc59e;
-}
-.control-group.warning .input-prepend .add-on,
-.control-group.warning .input-append .add-on {
-  color: #c09853;
-  background-color: #fcf8e3;
-  border-color: #c09853;
-}
-.control-group.error > label,
-.control-group.error .help-block,
-.control-group.error .help-inline {
-  color: #b94a48;
-}
-.control-group.error .checkbox,
-.control-group.error .radio,
-.control-group.error input,
-.control-group.error select,
-.control-group.error textarea {
-  color: #b94a48;
-  border-color: #b94a48;
-}
-.control-group.error .checkbox:focus,
-.control-group.error .radio:focus,
-.control-group.error input:focus,
-.control-group.error select:focus,
-.control-group.error textarea:focus {
-  border-color: #953b39;
-  -webkit-box-shadow: 0 0 6px #d59392;
-  -moz-box-shadow: 0 0 6px #d59392;
-  box-shadow: 0 0 6px #d59392;
-}
-.control-group.error .input-prepend .add-on,
-.control-group.error .input-append .add-on {
-  color: #b94a48;
-  background-color: #f2dede;
-  border-color: #b94a48;
-}
-.control-group.success > label,
-.control-group.success .help-block,
-.control-group.success .help-inline {
-  color: #468847;
-}
-.control-group.success .checkbox,
-.control-group.success .radio,
-.control-group.success input,
-.control-group.success select,
-.control-group.success textarea {
-  color: #468847;
-  border-color: #468847;
-}
-.control-group.success .checkbox:focus,
-.control-group.success .radio:focus,
-.control-group.success input:focus,
-.control-group.success select:focus,
-.control-group.success textarea:focus {
-  border-color: #356635;
-  -webkit-box-shadow: 0 0 6px #7aba7b;
-  -moz-box-shadow: 0 0 6px #7aba7b;
-  box-shadow: 0 0 6px #7aba7b;
-}
-.control-group.success .input-prepend .add-on,
-.control-group.success .input-append .add-on {
-  color: #468847;
-  background-color: #dff0d8;
-  border-color: #468847;
-}
-input:focus:required:invalid,
-textarea:focus:required:invalid,
-select:focus:required:invalid {
-  color: #b94a48;
-  border-color: #ee5f5b;
-}
-input:focus:required:invalid:focus,
-textarea:focus:required:invalid:focus,
-select:focus:required:invalid:focus {
-  border-color: #e9322d;
-  -webkit-box-shadow: 0 0 6px #f8b9b7;
-  -moz-box-shadow: 0 0 6px #f8b9b7;
-  box-shadow: 0 0 6px #f8b9b7;
-}
-.form-actions {
-  padding: 17px 20px 18px;
-  margin-top: 18px;
-  margin-bottom: 18px;
-  background-color: #f5f5f5;
-  border-top: 1px solid #e5e5e5;
-  *zoom: 1;
-}
-.form-actions:before,
-.form-actions:after {
-  display: table;
-  content: "";
-}
-.form-actions:after {
-  clear: both;
-}
-.uneditable-input {
-  overflow: hidden;
-  white-space: nowrap;
-  cursor: not-allowed;
-  background-color: #ffffff;
-  border-color: #eee;
-  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
-  -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
-  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
-}
-:-moz-placeholder {
-  color: #999999;
-}
-:-ms-input-placeholder {
-  color: #999999;
-}
-::-webkit-input-placeholder {
-  color: #999999;
-}
-.help-block,
-.help-inline {
-  color: #555555;
-}
-.help-block {
-  display: block;
-  margin-bottom: 9px;
-}
-.help-inline {
-  display: inline-block;
-  *display: inline;
-  /* IE7 inline-block hack */
-
-  *zoom: 1;
-  vertical-align: middle;
-  padding-left: 5px;
-}
-.input-prepend,
-.input-append {
-  margin-bottom: 5px;
-}
-.input-prepend input,
-.input-append input,
-.input-prepend select,
-.input-append select,
-.input-prepend .uneditable-input,
-.input-append .uneditable-input {
-  position: relative;
-  margin-bottom: 0;
-  *margin-left: 0;
-  vertical-align: middle;
-  -webkit-border-radius: 0 3px 3px 0;
-  -moz-border-radius: 0 3px 3px 0;
-  border-radius: 0 3px 3px 0;
-}
-.input-prepend input:focus,
-.input-append input:focus,
-.input-prepend select:focus,
-.input-append select:focus,
-.input-prepend .uneditable-input:focus,
-.input-append .uneditable-input:focus {
-  z-index: 2;
-}
-.input-prepend .uneditable-input,
-.input-append .uneditable-input {
-  border-left-color: #ccc;
-}
-.input-prepend .add-on,
-.input-append .add-on {
-  display: inline-block;
-  width: auto;
-  height: 18px;
-  min-width: 16px;
-  padding: 4px 5px;
-  font-weight: normal;
-  line-height: 18px;
-  text-align: center;
-  text-shadow: 0 1px 0 #ffffff;
-  vertical-align: middle;
-  background-color: #eeeeee;
-  border: 1px solid #ccc;
-}
-.input-prepend .add-on,
-.input-append .add-on,
-.input-prepend .btn,
-.input-append .btn {
-  margin-left: -1px;
-  -webkit-border-radius: 0;
-  -moz-border-radius: 0;
-  border-radius: 0;
-}
-.input-prepend .active,
-.input-append .active {
-  background-color: #a9dba9;
-  border-color: #46a546;
-}
-.input-prepend .add-on,
-.input-prepend .btn {
-  margin-right: -1px;
-}
-.input-prepend .add-on:first-child,
-.input-prepend .btn:first-child {
-  -webkit-border-radius: 3px 0 0 3px;
-  -moz-border-radius: 3px 0 0 3px;
-  border-radius: 3px 0 0 3px;
-}
-.input-append input,
-.input-append select,
-.input-append .uneditable-input {
-  -webkit-border-radius: 3px 0 0 3px;
-  -moz-border-radius: 3px 0 0 3px;
-  border-radius: 3px 0 0 3px;
-}
-.input-append .uneditable-input {
-  border-right-color: #ccc;
-  border-left-color: #eee;
-}
-.input-append .add-on:last-child,
-.input-append .btn:last-child {
-  -webkit-border-radius: 0 3px 3px 0;
-  -moz-border-radius: 0 3px 3px 0;
-  border-radius: 0 3px 3px 0;
-}
-.input-prepend.input-append input,
-.input-prepend.input-append select,
-.input-prepend.input-append .uneditable-input {
-  -webkit-border-radius: 0;
-  -moz-border-radius: 0;
-  border-radius: 0;
-}
-.input-prepend.input-append .add-on:first-child,
-.input-prepend.input-append .btn:first-child {
-  margin-right: -1px;
-  -webkit-border-radius: 3px 0 0 3px;
-  -moz-border-radius: 3px 0 0 3px;
-  border-radius: 3px 0 0 3px;
-}
-.input-prepend.input-append .add-on:last-child,
-.input-prepend.input-append .btn:last-child {
-  margin-left: -1px;
-  -webkit-border-radius: 0 3px 3px 0;
-  -moz-border-radius: 0 3px 3px 0;
-  border-radius: 0 3px 3px 0;
-}
-.search-query {
-  padding-right: 14px;
-  padding-right: 4px \9;
-  padding-left: 14px;
-  padding-left: 4px \9;
-  /* IE7-8 doesn't have border-radius, so don't indent the padding */
-
-  margin-bottom: 0;
-  -webkit-border-radius: 14px;
-  -moz-border-radius: 14px;
-  border-radius: 14px;
-}
-.form-search input,
-.form-inline input,
-.form-horizontal input,
-.form-search textarea,
-.form-inline textarea,
-.form-horizontal textarea,
-.form-search select,
-.form-inline select,
-.form-horizontal select,
-.form-search .help-inline,
-.form-inline .help-inline,
-.form-horizontal .help-inline,
-.form-search .uneditable-input,
-.form-inline .uneditable-input,
-.form-horizontal .uneditable-input,
-.form-search .input-prepend,
-.form-inline .input-prepend,
-.form-horizontal .input-prepend,
-.form-search .input-append,
-.form-inline .input-append,
-.form-horizontal .input-append {
-  display: inline-block;
-  *display: inline;
-  /* IE7 inline-block hack */
-
-  *zoom: 1;
-  margin-bottom: 0;
-}
-.form-search .hide,
-.form-inline .hide,
-.form-horizontal .hide {
-  display: none;
-}
-.form-search label,
-.form-inline label {
-  display: inline-block;
-}
-.form-search .input-append,
-.form-inline .input-append,
-.form-search .input-prepend,
-.form-inline .input-prepend {
-  margin-bottom: 0;
-}
-.form-search .radio,
-.form-search .checkbox,
-.form-inline .radio,
-.form-inline .checkbox {
-  padding-left: 0;
-  margin-bottom: 0;
-  vertical-align: middle;
-}
-.form-search .radio input[type="radio"],
-.form-search .checkbox input[type="checkbox"],
-.form-inline .radio input[type="radio"],
-.form-inline .checkbox input[type="checkbox"] {
-  float: left;
-  margin-right: 3px;
-  margin-left: 0;
-}
-.control-group {
-  margin-bottom: 9px;
-}
-legend + .control-group {
-  margin-top: 18px;
-  -webkit-margin-top-collapse: separate;
-}
-.form-horizontal .control-group {
-  margin-bottom: 18px;
-  *zoom: 1;
-}
-.form-horizontal .control-group:before,
-.form-horizontal .control-group:after {
-  display: table;
-  content: "";
-}
-.form-horizontal .control-group:after {
-  clear: both;
-}
-.form-horizontal .control-label {
-  float: left;
-  width: 140px;
-  padding-top: 5px;
-  text-align: right;
-}
-.form-horizontal .controls {
-  *display: inline-block;
-  *padding-left: 20px;
-  margin-left: 160px;
-  *margin-left: 0;
-}
-.form-horizontal .controls:first-child {
-  *padding-left: 160px;
-}
-.form-horizontal .help-block {
-  margin-top: 9px;
-  margin-bottom: 0;
-}
-.form-horizontal .form-actions {
-  padding-left: 160px;
-}
-.nav {
-  margin-left: 0;
-  margin-bottom: 18px;
-  list-style: none;
-}
-.nav > li > a {
-  display: block;
-}
-.nav > li > a:hover {
-  text-decoration: none;
-  background-color: #eeeeee;
-}
-.nav > .pull-right {
-  float: right;
-}
-.nav .nav-header {
-  display: block;
-  padding: 3px 15px;
-  font-size: 11px;
-  font-weight: bold;
-  line-height: 18px;
-  color: #999999;
-  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
-  text-transform: uppercase;
-}
-.nav li + .nav-header {
-  margin-top: 9px;
-}
-.nav-list {
-  padding-left: 15px;
-  padding-right: 15px;
-  margin-bottom: 0;
-}
-.nav-list > li > a,
-.nav-list .nav-header {
-  margin-left: -15px;
-  margin-right: -15px;
-  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
-}
-.nav-list > li > a {
-  padding: 3px 15px;
-}
-.nav-list > .active > a,
-.nav-list > .active > a:hover {
-  color: #ffffff;
-  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
-  background-color: #0088cc;
-}
-.nav-list [class^="icon-"] {
-  margin-right: 2px;
-}
-.nav-list .divider {
-  *width: 100%;
-  height: 1px;
-  margin: 8px 1px;
-  *margin: -5px 0 5px;
-  overflow: hidden;
-  background-color: #e5e5e5;
-  border-bottom: 1px solid #ffffff;
-}
-.nav-tabs,
-.nav-pills {
-  *zoom: 1;
-}
-.nav-tabs:before,
-.nav-pills:before,
-.nav-tabs:after,
-.nav-pills:after {
-  display: table;
-  content: "";
-}
-.nav-tabs:after,
-.nav-pills:after {
-  clear: both;
-}
-.nav-tabs > li,
-.nav-pills > li {
-  display: inline-block;
-}
-.nav-tabs > li > a,
-.nav-pills > li > a {
-  padding-right: 12px;
-  padding-left: 12px;
-  margin-right: 2px;
-  line-height: 14px;
-}
-.nav-tabs {
-  border-bottom: 1px solid #ddd;
-}
-.nav-tabs > li {
-  margin-bottom: -1px;
-}
-.nav-tabs > li > a {
-  padding-top: 8px;
-  padding-bottom: 8px;
-  line-height: 18px;
-  border: 1px solid transparent;
-  -webkit-border-radius: 4px 4px 0 0;
-  -moz-border-radius: 4px 4px 0 0;
-  border-radius: 4px 4px 0 0;
-}
-.nav-tabs > li > a:hover {
-  border-color: #eeeeee #eeeeee #dddddd;
-}
-.nav-tabs > .active > a,
-.nav-tabs > .active > a:hover {
-  color: #555555;
-  background-color: #ffffff;
-  border: 1px solid #ddd;
-  border-bottom-color: transparent;
-  cursor: default;
-}
-.nav-pills > li > a {
-  padding-top: 8px;
-  padding-bottom: 8px;
-  margin-top: 2px;
-  margin-bottom: 2px;
-  -webkit-border-radius: 5px;
-  -moz-border-radius: 5px;
-  border-radius: 5px;
-}
-.nav-pills > .active > a,
-.nav-pills > .active > a:hover {
-  color: #ffffff;
-  background-color: #0088cc;
-}
-.nav-stacked > li {
-  float: none;
-}
-.nav-stacked > li > a {
-  margin-right: 0;
-}
-.nav-tabs.nav-stacked {
-  border-bottom: 0;
-}
-.nav-tabs.nav-stacked > li > a {
-  border: 1px solid #ddd;
-  -webkit-border-radius: 0;
-  -moz-border-radius: 0;
-  border-radius: 0;
-}
-.nav-tabs.nav-stacked > li:first-child > a {
-  -webkit-border-radius: 4px 4px 0 0;
-  -moz-border-radius: 4px 4px 0 0;
-  border-radius: 4px 4px 0 0;
-}
-.nav-tabs.nav-stacked > li:last-child > a {
-  -webkit-border-radius: 0 0 4px 4px;
-  -moz-border-radius: 0 0 4px 4px;
-  border-radius: 0 0 4px 4px;
-}
-.nav-tabs.nav-stacked > li > a:hover {
-  border-color: #ddd;
-  z-index: 2;
-}
-.nav-pills.nav-stacked > li > a {
-  margin-bottom: 3px;
-}
-.nav-pills.nav-stacked > li:last-child > a {
-  margin-bottom: 1px;
-}
-.nav-tabs .dropdown-menu {
-  -webkit-border-radius: 0 0 5px 5px;
-  -moz-border-radius: 0 0 5px 5px;
-  border-radius: 0 0 5px 5px;
-}
-.nav-pills .dropdown-menu {
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  border-radius: 4px;
-}
-.nav-tabs .dropdown-toggle .caret,
-.nav-pills .dropdown-toggle .caret {
-  border-top-color: #0088cc;
-  border-bottom-color: #0088cc;
-  margin-top: 6px;
-}
-.nav-tabs .dropdown-toggle:hover .caret,
-.nav-pills .dropdown-toggle:hover .caret {
-  border-top-color: #005580;
-  border-bottom-color: #005580;
-}
-.nav-tabs .active .dropdown-toggle .caret,
-.nav-pills .active .dropdown-toggle .caret {
-  border-top-color: #333333;
-  border-bottom-color: #333333;
-}
-.nav > .dropdown.active > a:hover {
-  color: #000000;
-  cursor: pointer;
-}
-.nav-tabs .open .dropdown-toggle,
-.nav-pills .open .dropdown-toggle,
-.nav > li.dropdown.open.active > a:hover {
-  color: #ffffff;
-  background-color: #999999;
-  border-color: #999999;
-}
-.nav li.dropdown.open .caret,
-.nav li.dropdown.open.active .caret,
-.nav li.dropdown.open a:hover .caret {
-  border-top-color: #ffffff;
-  border-bottom-color: #ffffff;
-  opacity: 1;
-  filter: alpha(opacity=100);
-}
-.tabs-stacked .open > a:hover {
-  border-color: #999999;
-}
-.tabbable {
-  *zoom: 1;
-}
-.tabbable:before,
-.tabbable:after {
-  display: table;
-  content: "";
-}
-.tabbable:after {
-  clear: both;
-}
-.tab-content {
-  overflow: auto;
-}
-.tabs-below > .nav-tabs,
-.tabs-right > .nav-tabs,
-.tabs-left > .nav-tabs {
-  border-bottom: 0;
-}
-.tab-content > .tab-pane,
-.pill-content > .pill-pane {
-  display: none;
-}
-.tab-content > .active,
-.pill-content > .active {
-  display: block;
-}
-.tabs-below > .nav-tabs {
-  border-top: 1px solid #ddd;
-}
-.tabs-below > .nav-tabs > li {
-  margin-top: -1px;
-  margin-bottom: 0;
-}
-.tabs-below > .nav-tabs > li > a {
-  -webkit-border-radius: 0 0 4px 4px;
-  -moz-border-radius: 0 0 4px 4px;
-  border-radius: 0 0 4px 4px;
-}
-.tabs-below > .nav-tabs > li > a:hover {
-  border-bottom-color: transparent;
-  border-top-color: #ddd;
-}
-.tabs-below > .nav-tabs > .active > a,
-.tabs-below > .nav-tabs > .active > a:hover {
-  border-color: transparent #ddd #ddd #ddd;
-}
-.tabs-left > .nav-tabs > li,
-.tabs-right > .nav-tabs > li {
-  float: none;
-}
-.tabs-left > .nav-tabs > li > a,
-.tabs-right > .nav-tabs > li > a {
-  min-width: 74px;
-  margin-right: 0;
-  margin-bottom: 3px;
-}
-.tabs-left > .nav-tabs {
-  float: left;
-  margin-right: 19px;
-  border-right: 1px solid #ddd;
-}
-.tabs-left > .nav-tabs > li > a {
-  margin-right: -1px;
-  -webkit-border-radius: 4px 0 0 4px;
-  -moz-border-radius: 4px 0 0 4px;
-  border-radius: 4px 0 0 4px;
-}
-.tabs-left > .nav-tabs > li > a:hover {
-  border-color: #eeeeee #dddddd #eeeeee #eeeeee;
-}
-.tabs-left > .nav-tabs .active > a,
-.tabs-left > .nav-tabs .active > a:hover {
-  border-color: #ddd transparent #ddd #ddd;
-  *border-right-color: #ffffff;
-}
-.tabs-right > .nav-tabs {
-  float: right;
-  margin-left: 19px;
-  border-left: 1px solid #ddd;
-}
-.tabs-right > .nav-tabs > li > a {
-  margin-left: -1px;
-  -webkit-border-radius: 0 4px 4px 0;
-  -moz-border-radius: 0 4px 4px 0;
-  border-radius: 0 4px 4px 0;
-}
-.tabs-right > .nav-tabs > li > a:hover {
-  border-color: #eeeeee #eeeeee #eeeeee #dddddd;
-}
-.tabs-right > .nav-tabs .active > a,
-.tabs-right > .nav-tabs .active > a:hover {
-  border-color: #ddd #ddd #ddd transparent;
-  *border-left-color: #ffffff;
-}
-.pagination {
-  height: 36px;
-  margin: 18px 0;
-}
-.pagination ul {
-  display: inline-block;
-  *display: inline;
-  /* IE7 inline-block hack */
-
-  *zoom: 1;
-  margin-left: 0;
-  margin-bottom: 0;
-  -webkit-border-radius: 3px;
-  -moz-border-radius: 3px;
-  border-radius: 3px;
-  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
-  -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
-  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
-}
-.pagination li {
-  display: inline;
-}
-.pagination a {
-  float: left;
-  padding: 0 14px;
-  line-height: 34px;
-  text-decoration: none;
-  border: 1px solid #ddd;
-  border-left-width: 0;
-}
-.pagination a:hover,
-.pagination .active a {
-  background-color: #f5f5f5;
-}
-.pagination .active a {
-  color: #999999;
-  cursor: default;
-}
-.pagination .disabled span,
-.pagination .disabled a,
-.pagination .disabled a:hover {
-  color: #999999;
-  background-color: transparent;
-  cursor: default;
-}
-.pagination li:first-child a {
-  border-left-width: 1px;
-  -webkit-border-radius: 3px 0 0 3px;
-  -moz-border-radius: 3px 0 0 3px;
-  border-radius: 3px 0 0 3px;
-}
-.pagination li:last-child a {
-  -webkit-border-radius: 0 3px 3px 0;
-  -moz-border-radius: 0 3px 3px 0;
-  border-radius: 0 3px 3px 0;
-}
-.pagination-centered {
-  text-align: center;
-}
-.pagination-right {
-  text-align: right;
-}
-.well {
-  min-height: 20px;
-  padding: 19px;
-  margin-bottom: 20px;
-  background-color: #f5f5f5;
-  border: 1px solid #eee;
-  border: 1px solid rgba(0, 0, 0, 0.05);
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  border-radius: 4px;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
-  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
-}
-.well blockquote {
-  border-color: #ddd;
-  border-color: rgba(0, 0, 0, 0.15);
-}
-.well-large {
-  padding: 24px;
-  -webkit-border-radius: 6px;
-  -moz-border-radius: 6px;
-  border-radius: 6px;
-}
-.well-small {
-  padding: 9px;
-  -webkit-border-radius: 3px;
-  -moz-border-radius: 3px;
-  border-radius: 3px;
-}
diff --git a/scp/css/dashboard.css b/scp/css/dashboard.css
index 43ec338890ac6bcce9d7647f85841657d362fe88..249c43597aa05e73bcd7a3888f651313cfc05d08 100644
--- a/scp/css/dashboard.css
+++ b/scp/css/dashboard.css
@@ -27,20 +27,3 @@ span.label.disabled {
 span.label {
     cursor: pointer;
 }
-#table-here tr :not(:first-child) {
-    text-align: right;
-    padding-right: 2.3em;
-    width: 12%;
-}
-#table-here tr :not(:first-child) div {
-    position: relative;
-    margin-right: -1em;
-}
-#table-here tr :not(:first-child) div div {
-    position: absolute;
-    -moz-border-radius: 1em;
-    -webkit-border-radius: 1em;
-    border-radius: 1em;
-}
-
-
diff --git a/scp/css/scp.css b/scp/css/scp.css
index a560fbded538a7314e20b6aa62a69fb9bd6a2eea..2cec5526cd5ca027aae0d554951031aff58cb2da 100644
--- a/scp/css/scp.css
+++ b/scp/css/scp.css
@@ -1,7 +1,9 @@
 body {
   font-family: "Lato", "Helvetica Neue", arial, helvetica, sans-serif;
-  font-weight: 300;
+  font-weight: 400;
   letter-spacing: 0.15px;
+  -webkit-font-smoothing:antialiased;
+          font-smoothing:antialiased;
 }
 body, html {
     background:#eee;
@@ -11,13 +13,14 @@ body, html {
     padding:0;
 }
 
+.button.link,
 a {
     color:#184E81;
     text-decoration:none;
     display: inline-block;
 }
 
-a:hover {
+a:hover, .button.link:hover {
     text-decoration: underline;
 }
 
@@ -94,6 +97,8 @@ a time.relative {
 #breadcrumbs {
     color: #333;
     margin-bottom: 15px;
+    background-color:#F4FAFF;
+    padding:8px;
 }
 
 #breadcrumbs a {
@@ -481,6 +486,33 @@ a {
     text-align:center;
     font-size:0.9em;
 }
+table.dashboard-stats {
+    text-align:right;
+    border-bottom: 2px solid #ddd;
+}
+table.dashboard-stats tbody:first-child th {
+    border-bottom:1px dashed #ddd;
+    padding:0 4px 8px;
+}
+table.dashboard-stats tbody:nth-child(2) tr:nth-child(odd) {
+    background-color:#f0faff;
+}
+
+table.dashboard-stats tbody:nth-child(2) th {
+    padding:5px 8px;
+    border-right: 1px solid #ccc;
+    color:#999;
+}
+table.dashboard-stats tbody:nth-child(2) td {
+    padding:5px 4px;
+    border-right: 1px solid #ccc;
+}
+table.dashboard-stats tbody:nth-child(2) tr:hover {
+    background-color:#FFFFDD;
+}
+table.dashboard-stats tbody:nth-child(2) tr:hover th {
+    color:#000;
+}
 
 table { vertical-align:top; }
 
@@ -792,7 +824,7 @@ div.section-break h3 {
 h2 {
     margin:0 0 0.7em;
     padding:0;
-    font-size:1.2em;
+    font-size:1.4em;
     color:#0A568E;
 }
 
@@ -803,13 +835,26 @@ h2 i {
     color:#0a0;
 }
 
-h2 span { color:#000; }
+h2 small {
+    font-size:.8em;
+}
+/*h2 span { color:#000; }*/
 
 h3 {
     margin:10px 0 0 0;
     padding:5px 0;
     color:#444;
 }
+.tixTitle {
+   padding:0 5px 0px;
+}
+.tixTitle h3 {
+   color:#444;
+   padding:0;
+   margin:0;
+   font-size:1.4em;
+   font-weight:300;
+}
 
 .has_bottom_border {
     padding-bottom:5px;
@@ -824,6 +869,17 @@ h3 {
     background:#F4FAFF;
 }
 
+.ticket_info.custom-data thead th {
+    border-bottom: 2px solid #ccc;
+    background-color: white;
+}
+.custom-data th, .custom-data td {
+    padding: 3px;
+}
+table.custom-data {
+    margin-bottom: 1em;
+}
+
 .right_align { text-align:right; }
 
 h2 .reload {
@@ -1040,7 +1096,6 @@ ul.tabs {
 }
 
 #response_options ul.tabs {
-    padding-left:190px;
 }
 
 ul.tabs li {
@@ -1103,7 +1158,7 @@ ul.tabs.clean li.active {
 }
 
 ul.tabs li a {
-    font-weight: 300;
+    font-weight: 400;
     line-height: 20px;
     color: #444;
     color: rgba(0,0,0,0.6);
@@ -1432,7 +1487,7 @@ caption:hover > i.help-tip {
 
 h2 > i.help-tip {
     vertical-align: middle;
-    font-size: 1.1em;
+    font-size: .7em;
 }
 .form_table th h4 i.help-tip {
     color: white;
@@ -1456,7 +1511,9 @@ h2 > i.help-tip {
   background-repeat:no-repeat, repeat-x;
   border-bottom:1px solid #ddd;
 }
-
+#kb li:last-child {
+    border-bottom:none;
+}
 
 #kb li h4 {
     padding-bottom:3px;
@@ -1483,20 +1540,24 @@ h2 > i.help-tip {
 #faq {
   clear: both;
   margin: 0;
-  padding: 5px 0 10px 5px;
+  padding: 0px 0 10px 0px;
 }
 #faq ol {
   font-size: 15px;
   margin-left: 0;
   padding-left: 0;
+  margin:0!IMPORTANT;
 }
 #faq ol li {
   list-style: none;
-  margin: 0;
-  padding:5px 0;
+  margin: 0 0;
+  padding:10px 0 10px;
   color: #999;
   border-bottom:1px solid #ddd;
 }
+#faq ol li:last-child {
+  border-bottom:none;
+}
 
 #faq ol li a {
   display: inline;
@@ -1518,13 +1579,12 @@ h2 > i.help-tip {
 
 time.faq {
     display:inline-block;
-    float:right;
     color:#777;
 }
 
 .cat-desc {
     padding-top:5px;
-    padding-bottom:25px;
+    padding-bottom:15px;
 }
 
 .cat-manage-bar {
@@ -1742,6 +1802,7 @@ input[type="button"],
     border-radius: 3px;
     font-family: inherit;
     font-size: 0.95em;
+    font-weight: normal;
 -webkit-user-select: none;
    -moz-user-select: none;
     -ms-user-select: none;
@@ -1770,6 +1831,14 @@ select + .button {
     box-shadow: 0 0 0 2px rgba(255,255,255,0.7) inset;
     color: white;
 }
+.link.button, .link.button:hover, .link.button:active {
+    border: none;
+    box-shadow: none;
+    background-color: transparent;
+    color:#184E81;
+    padding: 0;
+    font-size: inherit;
+}
 
 .light .button:hover,
 .white.button {
@@ -1836,7 +1905,7 @@ select + .button {
 }
 
 button[type=submit], input[type="submit"], .primary.button {
-    font-weight: bold;
+    font-weight: normal;
     box-shadow: 0 0 0 1px rgba(0,0,0,0.45) inset;
     background-color: rgba(0,0,0,0.07);
 }
@@ -2236,18 +2305,20 @@ tr.disabled th {
 }
 
 .label {
-  font-size: 11px;
-  padding: 1px 4px;
-  -webkit-border-radius: 3px;
-  -moz-border-radius: 3px;
-  border-radius: 3px;
-  font-weight: bold;
-  line-height: 14px;
-  color: #ffffff;
-  vertical-align: baseline;
-  white-space: nowrap;
-  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-  background-color: #999999;
+    float: right;
+    margin-bottom: 4px;
+    font-size: 11px;
+    padding: 0px 7px;
+    -webkit-border-radius: 3px;
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+    font-weight: bold;
+    line-height: 18px;
+    color: #ffffff;
+    vertical-align: baseline;
+    white-space: nowrap;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #999999;
 }
 .label-bare {
   background-color: transparent;
@@ -2311,15 +2382,23 @@ table.custom-info td {
     border-bottom: 1px dotted rgba(0,0,0,0.3);
 }
 
+div.faq-status {
+   padding-top:6px;
+
+}
+
 .faq-title {
     font-size: 170%;
-    font-weight: 400;
-    padding-right: 200px;
+    font-weight: 600;
+    margin-right:10px;
 }
 .faq-content {
     width: 670px;
     margin: 0 15px;
 }
+.faq-category {
+    margin:0 15px;
+}
 .faq-meta section + section {
     margin-top: 15px;
 }
@@ -2391,6 +2470,7 @@ tr i.help-tip.warning {
 .ltr {
     direction: ltr;
     unicode-bidi: embed;
+
 }
 .required {
     font-weight: bold;
@@ -2748,7 +2828,7 @@ input, textarea {
 }
 
 small {
-    font-weight: 300;
+    font-weight: normal;
     letter-spacing: 0.01px;
 }
 
@@ -2796,6 +2876,16 @@ table.grid.form caption {
   border-top-left-radius: 3px;
   border-bottom-left-radius: 3px;
 }
+select {
+    height:24px;
+    line-height:24px;
+    max-width:350px;
+    border:1px solid #bbb;
+    display:inline-block;
+    padding:4px;
+    font-size:13px;
+}
+
 a.attachment {
     padding-left: 1.2em;
     display: block;
diff --git a/scp/dashboard.php b/scp/dashboard.php
index 8e48056787a4c86402040162f362f86a440cda95..3bece49a338f21326711f13d84e941e603fa7e1e 100644
--- a/scp/dashboard.php
+++ b/scp/dashboard.php
@@ -14,58 +14,39 @@
     vim: expandtab sw=4 ts=4 sts=4:
 **********************************************************************/
 require('staff.inc.php');
+
+require_once INCLUDE_DIR . 'class.report.php';
+
+if ($_POST['export']) {
+    $report = new OverviewReport($_POST['start'], $_POST['period']);
+    switch (true) {
+    case ($data = $report->getTabularData($_POST['export'])):
+        $ts = strftime('%Y%m%d');
+        $group = Format::slugify($_POST['export']);
+        $delimiter = ',';
+        if (class_exists('NumberFormatter')) {
+            $nf = NumberFormatter::create(Internationalization::getCurrentLocale(),
+                NumberFormatter::DECIMAL);
+            $s = $nf->getSymbol(NumberFormatter::DECIMAL_SEPARATOR_SYMBOL);
+            if ($s == ',')
+                $delimiter = ';';
+        }
+
+        Http::download("stats-$group-$ts.csv", 'text/csv');
+        $output = fopen('php://output', 'w');
+        fputs($output, chr(0xEF) . chr(0xBB) . chr(0xBF));
+        fputcsv($output, $data['columns'], $delimiter);
+        foreach ($data['data'] as $row)
+            fputcsv($output, $row, $delimiter);
+        exit;
+    }
+}
+
 $nav->setTabActive('dashboard');
 $ost->addExtraHeader('<meta name="tip-namespace" content="dashboard.dashboard" />',
     "$('#content').data('tipNamespace', 'dashboard.dashboard');");
-require(STAFFINC_DIR.'header.inc.php');
-?>
-
-<script type="text/javascript" src="js/raphael-min.js"></script>
-<script type="text/javascript" src="js/g.raphael.js"></script>
-<script type="text/javascript" src="js/g.line-min.js"></script>
-<script type="text/javascript" src="js/g.dot-min.js"></script>
-<script type="text/javascript" src="js/bootstrap-tab.js"></script>
-<script type="text/javascript" src="js/dashboard.inc.js"></script>
-
-<link rel="stylesheet" type="text/css" href="css/bootstrap.css"/>
-<link rel="stylesheet" type="text/css" href="css/dashboard.css"/>
 
-<h2><?php echo __('Ticket Activity');
-?>&nbsp;<i class="help-tip icon-question-sign" href="#ticket_activity"></i></h2>
-<p><?php echo __('Select the starting time and period for the system activity graph');?></p>
-<form class="well form-inline" id="timeframe-form">
-    <label>
-        <i class="help-tip icon-question-sign" href="#report_timeframe"></i>&nbsp;&nbsp;<?php
-            echo __('Report timeframe'); ?>:
-        <input type="text" class="dp input-medium search-query"
-            name="start" placeholder="<?php echo __('Last month');?>"/>
-    </label>
-    <label>
-        <?php echo __('period');?>:
-        <select name="period">
-            <option value="now" selected="selected"><?php echo __('Up to today');?></option>
-            <option value="+7 days"><?php echo __('One Week');?></option>
-            <option value="+14 days"><?php echo __('Two Weeks');?></option>
-            <option value="+1 month"><?php echo __('One Month');?></option>
-            <option value="+3 months"><?php echo __('One Quarter');?></option>
-        </select>
-    </label>
-    <button class="btn" type="submit"><?php echo __('Refresh');?></button>
-</form>
-
-<!-- Create a graph and fetch some data to create pretty dashboard -->
-<div style="position:relative">
-    <div id="line-chart-here" style="height:300px"></div>
-    <div style="position:absolute;right:0;top:0" id="line-chart-legend"></div>
-</div>
-
-<hr/>
-<h2><?php echo __('Statistics'); ?>&nbsp;<i class="help-tip icon-question-sign" href="#statistics"></i></h2>
-<p><?php echo __('Statistics of tickets organized by department, help topic, and agent.');?></p>
-<ul class="nav nav-tabs" id="tabular-navigation"></ul>
-
-<div id="table-here"></div>
-
-<?php
+require(STAFFINC_DIR.'header.inc.php');
+require_once(STAFFINC_DIR.'dashboard.inc.php');
 include(STAFFINC_DIR.'footer.inc.php');
 ?>
diff --git a/scp/js/dashboard.inc.js b/scp/js/dashboard.inc.js
index 683135e62c05b10975e6b79c897f0d33dc5557ec..dd850da7b6c4b57edfa58030c330e2922aa92e08 100644
--- a/scp/js/dashboard.inc.js
+++ b/scp/js/dashboard.inc.js
@@ -1,275 +1,99 @@
 (function ($) {
-    var current_tab = null;
-    function refresh(e) {
+    $.drawPlots = function(json) {
         $('#line-chart-here').empty();
         $('#line-chart-legend').empty();
         var r = new Raphael('line-chart-here'),
             width = $('#line-chart-here').width(),
             height = $('#line-chart-here').height();
-        $.ajax({
-            method:     'GET',
-            url:        'ajax.php/report/overview/graph',
-            data:       $(this).serialize(),
-            dataType:   'json',
-            success:    function(json) {
-                var times = [],
-                    smtimes = Array.prototype.concat.apply([], json.times),
-                    plots = [],
-                    max = 0;
+        var times = [],
+            smtimes = Array.prototype.concat.apply([], json.times),
+            plots = [],
+            max = 0;
 
-                // Convert the timestamp to number of whole days after the
-                // unix epoch.
-                for (key in smtimes) {
-                    smtimes[key] = Math.floor(smtimes[key] / 86400);
-                }
-                for (key in json.events) {
-                    e = json.events[key];
-                    if (json.plots[e] === undefined) continue;
-                    $('<span>').append(e)
-                        .attr({'class':'label','style':'margin-left:0.5em'})
-                        .appendTo($('#line-chart-legend'));
-                    $('<br>').appendTo('#line-chart-legend');
-                    times.push(smtimes);
-                    plots.push(json.plots[e]);
-                    // Keep track of max value from any plot
-                    max = Math.max(max, Math.max.apply(Math, json.plots[e]));
-                }
-                m = r.linechart(20, 0, width - 70, height,
-                    times, plots, { 
-                    gutter: 20,
-                    width: 1.6,
-                    nostroke: false, 
-                    shade: false,
-                    axis: "0 0 1 1",
-                    axisxstep: 8,
-                    axisystep: Math.min(12, max),
-                    symbol: "circle",
-                    smooth: false
-                }).hoverColumn(function () {
-                    this.tags = r.set();
-                    var slots = [];
-
-                    for (var i = 0, ii = this.y.length; i < ii; i++) {
-                        if (this.values[i] === 0) continue;
-                        if (this.symbols[i].node.style.display == "none") continue;
-                        var angle = 160;
-                        for (var j = 0, jj = slots.length; j < jj; j++) {
-                            if (slots[j][0] == this.x
-                                    && Math.abs(slots[j][1] - this.y[i]) < 20) {
-                                angle = 20;
-                                break;
-                            }
-                        }
-                        slots.push([this.x, this.y[i]]);
-                        this.tags.push(r.tag(this.x, this.y[i],
-                            this.values[i], angle,
-                            10).insertBefore(this).attr([
-                                { fill: '#eee' },
-                                { fill: this.symbols[i].attr('fill') }]));
-                    }
-                }, function () {
-                    this.tags && this.tags.remove();
-                });
-                // Change axis labels from Unix epoch
-                $('tspan', $('#line-chart-here')).each(function(e) {
-                    var text = this.firstChild.textContent;
-                    if (parseInt(text) > 10000)
-                        this.firstChild.textContent =
-                            $.datepicker.formatDate('mm-dd-yy',
-                            new Date(parseInt(text) * 86400000));
-                });
-                $('span.label').each(function(i, e) {
-                    e = $(e);
-                    e.click(function() {
-                        e.toggleClass('disabled');
-                        if (e.hasClass('disabled')) {
-                            m.symbols[i].hide();
-                            m.lines[i].hide();
-                        } else {
-                            m.symbols[i].show();
-                            m.lines[i].show();
-                        }
-                    });
-                });
-                // Dear aspiring API writers, please consider making [easy]
-                // things simpler than this...
-                $('span.label', '#line-chart-legend').css(
-                    'background-color', function(i) {
-                        return Raphael.color(m.symbols[i][0].attr('fill')).hex; 
-                });
-            }
-        });
-        if (this.start) build_table.apply(this);
-        return false;
-    }
-    $(function() { $('tabular-navigation').tab(); });
-
-    // Add tabs for the tabular display
-    $(function() {
-        $.ajax({
-            url:        'ajax.php/report/overview/table/groups',
-            dataType:   'json',
-            success:    function(json) {
-                var first=true;
-                for (key in json) {
-                    $('#tabular-navigation')
-                        .append($('<li>').attr(first ? {'class':'active'} : {})
-                        .append($('<a>')
-                            .click(build_table)
-                            .attr({'table-group':key,'href':'#'})
-                            .append(json[key])));
-                    first=false;
-                }
-                build_table.apply($('#tabular-navigation li:first-child a')[0])
-            }
-        });
-    });
-
-    var start, stop;
-    function build_table() {
-        if (this.tagName == 'A') {
-            current_tab = $(this).tab('show');
+        // Convert the timestamp to number of whole days after the
+        // unix epoch.
+        for (key in smtimes) {
+            smtimes[key] = Math.floor(smtimes[key] / 86400);
         }
-        else if (this.start) {
-            start = this.start.value || 'last month';
-            stop = this.period.value || 'now';
+        for (key in json.events) {
+            e = json.events[key];
+            if (json.plots[e] === undefined) continue;
+            $('<span>').append(e)
+                .attr({'class':'label','style':'margin-left:0.5em'})
+                .appendTo($('#line-chart-legend'));
+            $('<br>').appendTo('#line-chart-legend');
+            times.push(smtimes);
+            plots.push(json.plots[e]);
+            // Keep track of max value from any plot
+            max = Math.max(max, Math.max.apply(Math, json.plots[e]));
         }
+        m = r.linechart(20, 0, width - 70, height,
+            times, plots, {
+            gutter: 20,
+            width: 1.6,
+            nostroke: false,
+            shade: false,
+            axis: "0 0 1 1",
+            axisxstep: 8,
+            axisystep: Math.min(12, max),
+            symbol: "circle",
+            smooth: false
+        }).hoverColumn(function () {
+            this.tags = r.set();
+            var slots = [];
 
-        if (!current_tab)
-            current_tab = $('#tabular-navigation li:first-child a');
-
-        var group = current_tab.attr('table-group');
-        var pagesize = 25;
-        getConfig().then(function(c) { if (c.page_size) pagesize = c.page_size; });
-        $.ajax({
-            method:     'GET',
-            dataType:   'json',
-            url:        'ajax.php/report/overview/table',
-            data:       {group: group, start: start, period: stop},
-            success:    function(json) {
-                var q = $('<table>').attr({'class':'table table-condensed table-striped'}),
-                    h = $('<tr>').appendTo($('<thead>').appendTo(q)),
-                    max = [];
-                for (var c in json.columns) {
-                    h.append($('<th>').append(json.columns[c]));
-                    max.push(0);
-                }
-                for (y in json.data) {
-                    row = json.data[y];
-                    for (x in row) {
-                        max[x] = Math.max(max[x], parseFloat(row[x]||0));
-                    }
-                }
-                for (var i in json.data) {
-                    if (i % pagesize === 0)
-                        b = $('<tbody>').attr({'page':i/pagesize+1}).addClass('hidden').appendTo(q);
-                    row = json.data[i];
-                    tr = $('<tr>').appendTo(b);
-                    for (var j in row) {
-                        if (j == 0) 
-                            tr.append($('<th>').append(row[j]));
-                        else {
-                            val = parseFloat(row[j])||0;
-                            color = 'black';
-                            size = 0;
-                            if (val && max[j] && json.data.length > 1) {
-                                scale = val / max[j];
-                                color = Raphael.hsb(
-                                    Math.min((1 - scale) * .4, 1),
-                                    .75, .75);
-                                size = 16 * scale;
-                            }
-                            tr.append($('<td>')
-                                .append($('<div>').append(
-                                    $('<div>').css(val ? {
-                                        'background-color': color,
-                                        'width': size,
-                                        'height': size,
-                                        'top': 9 - (size / 2),
-                                        'right': 10 - (size / 2)
-                                    } : {})
-                                    .append("&nbsp;")))
-                                .append(row[j]));
-                        }
+            for (var i = 0, ii = this.y.length; i < ii; i++) {
+                if (this.values[i] === 0) continue;
+                if (this.symbols[i].node.style.display == "none") continue;
+                var angle = 160;
+                for (var j = 0, jj = slots.length; j < jj; j++) {
+                    if (slots[j][0] == this.x
+                            && Math.abs(slots[j][1] - this.y[i]) < 20) {
+                        angle = 20;
+                        break;
                     }
                 }
-                if (json.data.length == 0) {
-                    $('<tbody>').attr('page','1').append($('<tr>').append(
-                        $('<td>').attr('colspan','8').append(
-                            'No data for this timeframe found'))).appendTo(q);
-                }
-                $('tbody[page=1]', q).removeClass('hidden');
-                $('#table-here').empty().append(q);
-
-                // ----------------------> Pagination <---------------------
-                function goabs(e) {
-                    $('tbody', q).addClass('hidden');
-                    if (e.target) {
-                        page = e.target.text;
-                        $('tbody[page='+page+']', q).removeClass('hidden');
-                    } else {
-                        e.removeClass('hidden');
-                        page = e.attr('page')
-                    }
-                    return enable_next_prev(page);
-                }
-                function goprev() {
-                    current = $('tbody:not(.hidden)', q).attr('page');
-                    page = Math.max(1, parseInt(current) - 1);
-                    return goabs($('tbody[page='+page+']', q));
-                }
-                function gonext() {
-                    current = $('tbody:not(.hidden)', q).attr('page');
-                    page = Math.min(Math.floor(json.data.length / pagesize) + 1,
-                        parseInt(current) + 1);
-                    return goabs($('tbody[page='+page+']', q));
-                }
-                function enable_next_prev(page) {
-                    $('#table-here div.pagination li[page]').removeClass('active');
-                    $('#table-here div.pagination li[page='+page+']').addClass('active');
-
-                    if (page == 1)  $('#report-page-prev').addClass('disabled');
-                    else            $('#report-page-prev').removeClass('disabled');
-
-                    if (page == Math.floor(json.data.length / pagesize) + 1)
-                                    $('#report-page-next').addClass('disabled');
-                    else            $('#report-page-next').removeClass('disabled');
-                    return false;
-                }
-
-                var p = $('<ul>')
-                    .appendTo($('<div>').attr({'class':'pagination'})
-                    .appendTo($('#table-here')));
-                $('<a>').click(goprev).attr({'href':'#'})
-                    .append('&laquo;').appendTo($('<li>').attr({'id':'report-page-prev'})
-                    .appendTo(p));
-                $('tbody', q).each(function() {
-                    page = $(this).attr('page');
-                    $('<a>').click(goabs).attr({'href':'#'}).append(page)
-                        .appendTo($('<li>').attr({'page':page})
-                        .appendTo(p));
-                });
-                $('<a>').click(gonext).attr({'href':'#'})
-                    .append('&raquo;').appendTo($('<li>').attr({'id':'report-page-next'})
-                    .appendTo(p));
-
-                // ------------------------> Export <-----------------------
-                $('<a>').attr({'href':'ajax.php/report/overview/table/export?group='
-                        +group+'&start='+start+'&stop='+stop}).append('Export')
-                    .addClass('no-pjax')
-                    .appendTo($('<li>')
-                    .appendTo(p));
-
-                goprev();
+                slots.push([this.x, this.y[i]]);
+                this.tags.push(r.tag(this.x, this.y[i],
+                    this.values[i], angle,
+                    10).insertBefore(this).attr([
+                        { fill: '#eee' },
+                        { fill: this.symbols[i].attr('fill') }]));
             }
+        }, function () {
+            this.tags && this.tags.remove();
         });
-        return false;
-    }
-
-    $(function() {
-        var form = $('#timeframe-form');
-        form.submit(refresh);
-        //Trigger submit now...init.
-        form.submit();
-    });
+        // Change axis labels from Unix epoch
+        var qq = setInterval(function() {
+            if ($.datepicker === undefined)
+                return;
+            clearInterval(qq);
+            $('tspan', $('#line-chart-here')).each(function(e) {
+                var text = this.firstChild.textContent;
+                if (parseInt(text) > 10000)
+                    this.firstChild.textContent =
+                        $.datepicker.formatDate('mm-dd-yy',
+                        new Date(parseInt(text) * 86400000));
+            });
+        }, 50);
+        $('span.label').each(function(i, e) {
+            e = $(e);
+            e.click(function() {
+                e.toggleClass('disabled');
+                if (e.hasClass('disabled')) {
+                    m.symbols[i].hide();
+                    m.lines[i].hide();
+                } else {
+                    m.symbols[i].show();
+                    m.lines[i].show();
+                }
+            });
+        });
+        // Dear aspiring API writers, please consider making [easy]
+        // things simpler than this...
+        $('span.label', '#line-chart-legend').css(
+            'background-color', function(i) {
+                return Raphael.color(m.symbols[i][0].attr('fill')).hex;
+        });
+    };
 })(window.jQuery);
diff --git a/scp/js/scp.js b/scp/js/scp.js
index fe090490ab19626257041f5afbfbce29f9489f75..8408453d0dc465d5e33c6097397039a29595ecc9 100644
--- a/scp/js/scp.js
+++ b/scp/js/scp.js
@@ -84,7 +84,7 @@ var scp_prep = function() {
         return false;
      });
 
-    $('#actions :submit.button:not(.no-confirm), #actions .confirm').bind('click', function(e) {
+    $('#actions:submit, #actions :submit.button:not(.no-confirm), #actions .confirm').bind('click', function(e) {
 
         var formObj,
             name = this.name || $(this).data('name');
@@ -136,7 +136,7 @@ var scp_prep = function() {
         var fObj = el.closest('form');
         if(!fObj.data('changed')){
             fObj.data('changed', true);
-            $('input[type=submit]', fObj).addClass('save pending');
+            $('input[type=submit], button[type=submit]', fObj).addClass('save pending');
             $(window).bind('beforeunload', function(e) {
                 return __('Are you sure you want to leave? Any changes or info you\'ve entered will be discarded!');
             });
@@ -146,14 +146,14 @@ var scp_prep = function() {
         }
     };
 
-    $("form#save").on('change', ':input[name]', function() {
+    $("form#save").on('change', ':input[name], :button[name]', function() {
         if (!$(this).is('.nowarn')) warnOnLeave($(this));
     });
 
-    $("form#save").on('change', ':input[type=reset]', function() {
+    $("form#save").on('click', ':input[type=reset], :button[type=reset]', function() {
         var fObj = $(this).closest('form');
         if(fObj.data('changed')){
-            $('input[type=submit]', fObj).removeClass('save pending');
+            $('input[type=submit], button[type=submit]', fObj).removeClass('save pending');
             $('label', fObj).removeAttr('style');
             $('label', fObj).removeClass('strike');
             fObj.data('changed', false);
@@ -587,7 +587,7 @@ $.toggleOverlay = function (show) {
     $('body').css('overflow', 'auto');
   }
 };
-
+//modal---------//
 $.dialog = function (url, codes, cb, options) {
     options = options||{};
 
@@ -746,7 +746,7 @@ $.confirm = function(message, title, options) {
                 .append($('<input type="button" class="close"/>')
                     .attr('value', __('Cancel'))
                     .click(function() { hide(); })
-            )).append($('<span class="buttons pull-right"></span>')
+            )).append($('<span class="buttons pull-right">test</span>')
                 .append($('<input type="button"/>')
                     .attr('value', __('OK'))
                     .click(function() {  hide(); D.resolve(body.find('input').serializeArray()); })
diff --git a/scp/tickets.php b/scp/tickets.php
index c08e3d5ac4a429d2d0c7e2d6150086379d5ef253..8ae7ca004d88ae3b22d1e93d1013bd006aa516fc 100644
--- a/scp/tickets.php
+++ b/scp/tickets.php
@@ -392,21 +392,6 @@ if($stats['overdue']) {
         $sysnotice=sprintf(__('%d overdue tickets!'),$stats['overdue']);
 }
 
-if($thisstaff->showAssignedOnly() && $stats['closed']) {
-    $nav->addSubMenu(array('desc'=>__('My Closed Tickets'),
-                           'title'=>__('My Closed Tickets'),
-                           'href'=>'tickets.php?status=closed',
-                           'iconclass'=>'closedTickets'),
-                        ($_REQUEST['status']=='closed'));
-} else {
-
-    $nav->addSubMenu(array('desc' => __('Closed'),
-                           'title'=>__('Closed Tickets'),
-                           'href'=>'tickets.php?status=closed',
-                           'iconclass'=>'closedTickets'),
-                        ($_REQUEST['status']=='closed'));
-}
-
 if (isset($_SESSION['advsearch'])) {
     // XXX: De-duplicate and simplify this code
     $search = SavedSearch::create();
@@ -421,6 +406,12 @@ if (isset($_SESSION['advsearch'])) {
                         (!$_REQUEST['status'] || $_REQUEST['status']=='search'));
 }
 
+$nav->addSubMenu(array('desc' => __('Closed'),
+                       'title'=>__('Closed Tickets'),
+                       'href'=>'tickets.php?status=closed',
+                       'iconclass'=>'closedTickets'),
+                    ($_REQUEST['status']=='closed'));
+
 if ($thisstaff->hasPerm(TicketModel::PERM_CREATE, false)) {
     $nav->addSubMenu(array('desc'=>__('New Ticket'),
                            'title'=> __('Open a New Ticket'),