diff --git a/testswarm.install b/testswarm.install
index 1cc2f5e..68bec75 100644
--- a/testswarm.install
+++ b/testswarm.install
@@ -292,7 +292,7 @@ function testswarm_update_8001() {
     db_add_index('testswarm_test', 'info_id', $schema['testswarm_test']['indexes']['info_id']);
 
     global $base_url;
-    $version = explode('.', VERSION);
+    $version = explode('.', \Drupal::VERSION);
     $version = array_shift($version);
     $sitename = config('system.site')->get('name');
 
diff --git a/testswarm.module b/testswarm.module
index 16a986a..0dd7ecc 100644
--- a/testswarm.module
+++ b/testswarm.module
@@ -388,7 +388,7 @@ function testswarm_page_alter(&$page) {
  * @TODO: add permission so more people can still use submit.
  */
 function testswarm_form_alter(&$form, &$form_state, $form_id) {
-  $account = Drupal::request()->attributes->get('account');
+  $account = Drupal::request()->attributes->get('_account');
   if ((!$account || $account->id() != 1) && !in_array($form_id, array('user_login_form', 'testswarm_set_karma_form'))) {
     if (!user_access('is allowed to submit forms')) {
       _testswarm_disable_submit($form);
@@ -437,7 +437,8 @@ function testswarm_test_done() {
   if (isset($_REQUEST['caller']) && isset($_REQUEST['token'])) {
     if (drupal_valid_token($_REQUEST['token'], $_REQUEST['caller'], TRUE)) {
       $config = Drupal::config('testswarm.settings');
-      global $user, $base_url;
+      global $base_url;
+      $user = Drupal::request()->attributes->get('_account');
       $testswarm_test = array(
         'caller' => $_REQUEST['caller'],
         'githash' => $config->get('testswarm_githash'),
@@ -448,11 +449,11 @@ function testswarm_test_done() {
         'passed' => $_REQUEST['info']['passed'],
         'failed' => $_REQUEST['info']['failed'],
         'runtime' => $_REQUEST['info']['runtime'],
-        'uid' => $user->uid,
+        'uid' => $user->id(),
         'timestamp' => REQUEST_TIME,
         'module' => $_REQUEST['module'],
         'description' => $_REQUEST['description'],
-        'version' => VERSION,
+        'version' => \Drupal::VERSION,
         'sitename' => config('system.site')->get('name'),
         'url' => $base_url,
       );
@@ -686,7 +687,7 @@ function testswarm_browser_tests() {
   $output .= property_exists($browser, 'parent') ? '<h2>' . $browser->browser . ' (' . $browser->parent . ')' . '</h2>' : '<h2>' . $browser->browser . '</h2>';
   $output .= '<p>' . check_plain($_SERVER['HTTP_USER_AGENT']) . '</p>';
   $githash = $config->get('testswarm_githash');
-  $link = empty($githash) ? l(VERSION, 'http://drupal.org/project/drupal') : l(_testswarm_short_githash(), 'http://drupalcode.org/project/drupal.git/commit/' . $githash);
+  $link = empty($githash) ? l(\Drupal::VERSION, 'http://drupal.org/project/drupal') : l(_testswarm_short_githash(), 'http://drupalcode.org/project/drupal.git/commit/' . $githash);
   $output .= '<p>Current drupal version: ' . $link . '</p>';
   $output .= '<p>' . l('Run all tests', 'testswarm-run-all-tests') . '</p>';
 
@@ -703,6 +704,7 @@ function testswarm_browser_tests() {
   );
   $rows = array();
   foreach ($result as $rowdata) {
+    $rowdata->result = ((int)$rowdata->failed < 1) ? 1 : 0;
     $image = ($rowdata->result == 1 ? 'message-24-ok' : 'message-24-error');
     $rows[] = array(
       'data' => array(
diff --git a/testswarm.pages.inc b/testswarm.pages.inc
index b3649e6..f05b2e9 100644
--- a/testswarm.pages.inc
+++ b/testswarm.pages.inc
@@ -82,7 +82,7 @@ function testswarm_tests($githash = '', $theme = '', $karma = '', $module = '')
   $output .= (user_access('administer testswarm tests') ? ' | ' . l(t('Clear all test details'), 'testswarm-tests/clear/all', array('query' => array('destination' => 'testswarm-tests'))) : '');
   $output .= '</p>';
   $githash = $config->get('testswarm_githash');
-  $link = empty($githash) ? l(VERSION, 'http://drupal.org/project/drupal') : l(_testswarm_short_githash(), 'http://drupalcode.org/project/drupal.git/commit/' . $githash);
+  $link = empty($githash) ? l(\Drupal::VERSION, 'http://drupal.org/project/drupal') : l(_testswarm_short_githash(), 'http://drupalcode.org/project/drupal.git/commit/' . $githash);
   $output .= '<p>Current/Latest drupal version: ' . $link;
   $output .= ' | ' . l(t('Show all tests'), 'testswarm-tests');
   $output .= '</p>';
@@ -369,7 +369,7 @@ function testswarm_test_details_hash($caller, $githash) {
         $output .= l(t('Show only failures'), current_path(), array('query' => array('filter-failures' => 'yes')));
       }
       $githash = $config->get('testswarm_githash');
-      $link = empty($githash) ? l(VERSION, 'http://drupal.org/project/drupal') : l(_testswarm_short_githash(), 'http://drupalcode.org/project/drupal.git/commit/' . $githash);
+      $link = empty($githash) ? l(\Drupal::VERSION, 'http://drupal.org/project/drupal') : l(_testswarm_short_githash(), 'http://drupalcode.org/project/drupal.git/commit/' . $githash);
       $output .= '<p>'
         . (testswarm_user_can_run_test($test) ? l(t('Test now'), 'testswarm-run-a-test/' . $caller, array('query' => array('destination' => 'testswarm-tests/detail/' . $caller))) : '')
         . (testswarm_user_can_run_test($test) ? ' | ' . l(t('Test manually'), 'testswarm-run-a-test/' . $caller, array('query' => array('debug' => 'on'))) : '')
