diff --git a/README.txt b/README.txt
old mode 100644
new mode 100755
diff --git a/assets/css/swish-payment-pending.css b/assets/css/swish-payment-pending.css
old mode 100644
new mode 100755
diff --git a/assets/img/loading.gif b/assets/img/loading.gif
old mode 100644
new mode 100755
diff --git a/assets/js/swish-payment-pending.js b/assets/js/swish-payment-pending.js
old mode 100644
new mode 100755
diff --git a/composer.json b/composer.json
old mode 100644
new mode 100755
diff --git a/config/install/swish_payment.swishpayment.yml b/config/install/swish_payment.swishpayment.yml
old mode 100644
new mode 100755
diff --git a/modules/swish_payment_block/composer.json b/modules/swish_payment_block/composer.json
old mode 100644
new mode 100755
diff --git a/modules/swish_payment_block/config/install/swish_payment_block.swishpaymentblock.yml b/modules/swish_payment_block/config/install/swish_payment_block.swishpaymentblock.yml
old mode 100644
new mode 100755
diff --git a/modules/swish_payment_block/src/Form/SwishPaymentBlockForm.php b/modules/swish_payment_block/src/Form/SwishPaymentBlockForm.php
old mode 100644
new mode 100755
diff --git a/modules/swish_payment_block/src/Plugin/Block/SwishPaymentBlock.php b/modules/swish_payment_block/src/Plugin/Block/SwishPaymentBlock.php
old mode 100644
new mode 100755
index d33fec7..3ba6b5e
--- a/modules/swish_payment_block/src/Plugin/Block/SwishPaymentBlock.php
+++ b/modules/swish_payment_block/src/Plugin/Block/SwishPaymentBlock.php
@@ -15,16 +15,15 @@ use Drupal\Core\Form\FormStateInterface;
  */
 class SwishPaymentBlock extends BlockBase {
 
-
   /**
    * {@inheritdoc}
    */
   public function defaultConfiguration() {
     return [
-         'amount' => 0,
-        ] + parent::defaultConfiguration();
+      'amount' => 0,
+    ] + parent::defaultConfiguration();
 
- }
+  }
 
   /**
    * {@inheritdoc}
@@ -65,7 +64,11 @@ class SwishPaymentBlock extends BlockBase {
    * {@inheritdoc}
    */
   public function build() {
-    $options = ['amount' =>$this->configuration['amount'], 'reference' => $this->configuration['ref'], 'message' => $this->configuration['message']];
+    $options = [
+      'amount' => $this->configuration['amount'],
+      'reference' => $this->configuration['ref'],
+      'message' => $this->configuration['message'],
+    ];
     $form = \Drupal::formBuilder()->getForm('Drupal\swish_payment_block\Form\SwishPaymentBlockForm', $options);
     $build = [];
     $build['swish_payment_block_amount']['#markup'] = '<p>' . $this->configuration['amount'] . '</p>';
diff --git a/modules/swish_payment_block/src/Tests/LoadTest.php b/modules/swish_payment_block/src/Tests/LoadTest.php
old mode 100644
new mode 100755
diff --git a/modules/swish_payment_block/swish_payment_block.info.yml b/modules/swish_payment_block/swish_payment_block.info.yml
old mode 100644
new mode 100755
diff --git a/modules/swish_payment_block/swish_payment_block.module b/modules/swish_payment_block/swish_payment_block.module
old mode 100644
new mode 100755
diff --git a/modules/swish_payment_block/templates/swish_payment_block.html.twig b/modules/swish_payment_block/templates/swish_payment_block.html.twig
old mode 100644
new mode 100755
diff --git a/src/Controller/CallbackController.php b/src/Controller/CallbackController.php
old mode 100644
new mode 100755
diff --git a/src/Entity/SwishTransaction.php b/src/Entity/SwishTransaction.php
old mode 100644
new mode 100755
diff --git a/src/Entity/SwishTransactionInterface.php b/src/Entity/SwishTransactionInterface.php
old mode 100644
new mode 100755
diff --git a/src/Entity/SwishTransactionViewsData.php b/src/Entity/SwishTransactionViewsData.php
old mode 100644
new mode 100755
diff --git a/src/Form/SwishPaymentForm.php b/src/Form/SwishPaymentForm.php
old mode 100644
new mode 100755
index 929cf8a..fd523a3
--- a/src/Form/SwishPaymentForm.php
+++ b/src/Form/SwishPaymentForm.php
@@ -15,7 +15,6 @@ use Drupal\swish_payment\SwishClient;
  */
 class SwishPaymentForm extends FormBase {
 
-
   /**
    * {@inheritdoc}
    */
@@ -30,13 +29,13 @@ class SwishPaymentForm extends FormBase {
     $form['phone'] = [
       '#type' => 'tel',
       '#title' => $this->t('Cell number'),
-      '#required' => true,
+      '#required' => TRUE,
       '#description' => $this->t('Enter the phone number of payment device here.'),
     ];
     $form['amount'] = [
       '#type' => 'number',
       '#title' => $this->t('Amount'),
-      '#required' => true,
+      '#required' => TRUE,
       '#description' => $this->t('Enter amount to pay/donate here.'),
     ];
     $form['ref'] = [
@@ -50,20 +49,13 @@ class SwishPaymentForm extends FormBase {
       '#description' => $this->t('Enter a messsage here.'),
     ];
     $form['submit'] = [
-        '#type' => 'submit',
-        '#value' => $this->t('Submit'),
+      '#type' => 'submit',
+      '#value' => $this->t('Submit'),
     ];
     return $form;
   }
 
   /**
-    * {@inheritdoc}
-    */
-  public function validateForm(array &$form, FormStateInterface $form_state) {
-    parent::validateForm($form, $form_state);
-  }
-
-  /**
    * {@inheritdoc}
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
@@ -75,17 +67,18 @@ class SwishPaymentForm extends FormBase {
         $form_state->getValue('message')
       );
     $form_state->disableRedirect();
-    if($trans) {
+    if ($trans) {
       $form_state->setResponse(
         new RedirectResponse(
-          Url::fromRoute("swish_payment.callback_pending", ['trans_id' => $trans->getTransactionId()], ['https'=>TRUE, 'absolute'=>TRUE] )->toString())
+          Url::fromRoute("swish_payment.callback_pending", ['trans_id' => $trans->getTransactionId()], ['https' => TRUE, 'absolute' => TRUE])->toString())
         );
     }
     else {
       $form_state->setResponse(
         new RedirectResponse(
-          Url::fromRoute("swish_payment.callback_error", [], ['absolute'=>TRUE] )->toString())
+          Url::fromRoute("swish_payment.callback_error", [], ['absolute' => TRUE])->toString())
         );
     }
   }
+
 }
diff --git a/src/Form/SwishSettingsForm.php b/src/Form/SwishSettingsForm.php
old mode 100644
new mode 100755
index b33f902..be35ad0
--- a/src/Form/SwishSettingsForm.php
+++ b/src/Form/SwishSettingsForm.php
@@ -34,57 +34,57 @@ class SwishSettingsForm extends ConfigFormBase {
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
     $config = $this->config('swish_payment.settings');
-    $form['payee_alias'] = array(
+    $form['payee_alias'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Payee alias'),
       '#description' => $this->t('Enter your Swish number here.'),
       '#default_value' => $config->get('payee_alias'),
-      '#required' => true,
-    );
-    $form['private_key'] = array(
+      '#required' => TRUE,
+    ];
+    $form['private_key'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Private key'),
       '#description' => $this->t('Path and filename to the private key file. Should reside outside if www-root if possible.'),
       '#default_value' => $config->get('private_key'),
-      '#required' => true,
-    );
-    $form['private_key_pw'] = array(
+      '#required' => TRUE,
+    ];
+    $form['private_key_pw'] = [
       '#type' => 'password',
       '#title' => $this->t('Private key password'),
       '#description' => $this->t('Password for the private key, if any.'),
       '#default_value' => $config->get('private_key_pw'),
-    );
-    $form['client_cert'] = array(
+    ];
+    $form['client_cert'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Client cert'),
       '#description' => $this->t('Path and filename to the client cert file. Should reside outside if www-root if possible.'),
       '#default_value' => $config->get('client_cert'),
-      '#required' => true,
-    );
-    $form['client_cert_pw'] = array(
+      '#required' => TRUE,
+    ];
+    $form['client_cert_pw'] = [
       '#type' => 'password',
       '#title' => $this->t('Client cert password'),
       '#description' => $this->t('Password for the client certificate, if any.'),
       '#default_value' => $config->get('client_cert_pw'),
-    );
-    $form['ca_cert'] = array(
+    ];
+    $form['ca_cert'] = [
       '#type' => 'textfield',
       '#title' => $this->t('CA root cert'),
       '#description' => $this->t('Path and filename to the CA root cert file. Omit this and you must either import the CA on the server or disable CA verification belove.'),
       '#default_value' => $config->get('ca_cert'),
-    );
-    $form['disable_ca_verification'] = array(
+    ];
+    $form['disable_ca_verification'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Disable CA verification'),
       '#description' => $this->t('Check this to disable CA verification.'),
       '#default_value' => $config->get('disable_ca_verification'),
-    );
-    $form['live_mode'] = array(
+    ];
+    $form['live_mode'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Live mode'),
       '#description' => $this->t('Check this to call live server.'),
       '#default_value' => $config->get('live_mode'),
-    );
+    ];
     return parent::buildForm($form, $form_state);
   }
 
@@ -105,4 +105,5 @@ class SwishSettingsForm extends ConfigFormBase {
       ->save();
     parent::submitForm($form, $form_state);
   }
+  
 }
diff --git a/src/Form/SwishTransactionDeleteForm.php b/src/Form/SwishTransactionDeleteForm.php
old mode 100644
new mode 100755
diff --git a/src/Form/SwishTransactionForm.php b/src/Form/SwishTransactionForm.php
old mode 100644
new mode 100755
diff --git a/src/Form/SwishTransactionSettingsForm.php b/src/Form/SwishTransactionSettingsForm.php
old mode 100644
new mode 100755
diff --git a/src/SwishClient.php b/src/SwishClient.php
old mode 100644
new mode 100755
index 405c060..d0927da
--- a/src/SwishClient.php
+++ b/src/SwishClient.php
@@ -1,17 +1,16 @@
 <?php
+
 namespace Drupal\swish_payment;
 
+use GuzzleHttp\Client;
 use Drupal\Core\Url;
-use GuzzleHttp\ClientInterface;
-use GuzzleHttp\Handler\CurlFactory;
 use GuzzleHttp\Handler\CurlHandler;
 use GuzzleHttp\HandlerStack;
-use Psr\Http\Message\ResponseInterface;
 use Drupal\swish_payment\Entity\SwishTransaction;
 
 /**
  * Class that handles calling Swish API.
- * http://www.payexpim.com/category/pxorder/
+ * http://www.payexpim.com/category/pxorder/.
  *
  * @param boolean $testMode Decides if running testmode or not.
  * @param boolean $md5 set to true for MD5 hash algorithm, false for SHA1.
@@ -30,21 +29,28 @@ class SwishClient {
    */
   private $client;
 
+  /**
+   *
+   */
   public function __construct($client, $liveMode) {
     $this->client = $client;
     $this->baseURL = ($liveMode ? self::SWISH_PRODUCTION_URL : self::SWISH_TEST_URL);
   }
 
   /**
-   * @param string $payerAlias The mobile number of the payment device
-   * @param string $amount The amount in SEK
-   * @param string $payeePaymentReference Optional order ID or similar
-   * @param string $message Optional message to be shown in the app.
-   * @return SwishTransaction
+   * @param string $payerAlias
+   *   The mobile number of the payment device.
+   * @param string $amount
+   *   The amount in SEK.
+   * @param string $payeePaymentReference
+   *   Optional order ID or similar.
+   * @param string $message
+   *   Optional message to be shown in the app.
+   * @return \Drupal\swish_payment\Entity\SwishTransaction
    */
-  public function createPaymentRequest($payerAlias, $amount, $payeePaymentReference = null, $message = null) {
+  public function createPaymentRequest($payerAlias, $amount, $payeePaymentReference = NULL, $message = NULL) {
     try {
-      $callbackUrl = Url::fromRoute("swish_payment.callback_update", [], ['https'=>TRUE, 'absolute'=>TRUE])->toString();
+      $callbackUrl = Url::fromRoute("swish_payment.callback_update", [], ['https' => TRUE, 'absolute' => TRUE])->toString();
       $config = \Drupal::config('swish_payment.settings');
       $payerAlias = self::normalizePhoneNo($payerAlias);
       $data = [
@@ -53,22 +59,24 @@ class SwishClient {
         "payerAlias" => $payerAlias,
         "payeeAlias" => $config->get('payee_alias'),
         "amount" => $amount,
-        "currency" => 'SEK', //SEK only, sorry guys.
+      // SEK only, sorry guys.
+        "currency" => 'SEK',
         "message" => $message,
       ];
 
       $response = $this->sendRequest('POST', '/paymentrequests', $data);
       $statusCode = $response->getStatusCode();
-      $trans = false;
-      if($statusCode == 201) {
-        $locationParts =  explode("/", reset($response->getHeader('Location')));
+      $trans = FALSE;
+      if ($statusCode == 201) {
+        $locationParts = explode("/", reset($response->getHeader('Location')));
         $transactionId = array_pop($locationParts);
         $trans = SwishTransaction::create();
         $trans->setTransactionId($transactionId);
         $trans->setPayeePaymentReference($payeePaymentReference);
         $trans->setPayerAlias($payerAlias);
-        if($message)
+        if ($message) {
           $trans->setMessage($message);
+        }
         $trans->setAmount($amount);
         $trans->setStatus('CREATED');
         $trans->save();
@@ -79,37 +87,44 @@ class SwishClient {
       }
       return $trans;
     }
-    catch(Exception $e) {
+    catch (Exception $e) {
       drupal_set_message(t('An error occured !e', ['!e' => $e->getMessage()]), 'error');
       /*TODO: more error logging here*/
     }
-    return false;
+    return FALSE;
   }
 
   /**
-   * @param string $transactionId The transaction ID
-   * @return SwishTransaction
+   * @param string $transactionId
+   *   The transaction ID.
+   * @return \Drupal\swish_payment\Entity\SwishTransaction
    */
   public function retrievePaymentRequest($transactionId) {
     try {
-      $response = $this->sendRequest('GET', '/paymentrequests/'.$transactionId);
+      $response = $this->sendRequest('GET', '/paymentrequests/' . $transactionId);
       $statusCode = $response->getStatusCode();
-      $trans = false;
-      if($statusCode == 200) {
-        if($trans = SwishTransaction::Load($transactionId)) {
+      $trans = FALSE;
+      if ($statusCode == 200) {
+        if ($trans = SwishTransaction::Load($transactionId)) {
           $data = json_decode($response->getBody());
-          if($data['paymentReference'])
+          if ($data['paymentReference']) {
             $trans->setPaymentReference($data['paymentReference']);
-          if($data['status'])
+          }
+          if ($data['status']) {
             $trans->setStatus($data['status']);
-          if($data['datePaid'])
+          }
+          if ($data['datePaid']) {
             $trans->setPaidTime(strtotime($data['datePaid']));
-          if($data['errorCode'])
+          }
+          if ($data['errorCode']) {
             $trans->setErrorCode($data['errorCode']);
-          if($data['errorMessage'])
+          }
+          if ($data['errorMessage']) {
             $trans->setErrorMessage($data['errorMessage']);
-          if($data['additionalInformation'])
+          }
+          if ($data['additionalInformation']) {
             $trans->setAdditionalInformation($data['additionalInformation']);
+          }
           $trans->save();
         }
         return $trans;
@@ -118,28 +133,30 @@ class SwishClient {
         drupal_set_message(t('Error !code', ['!code' => $statusCode]), 'error');
       }
     }
-    catch(Exception $e) {
+    catch (Exception $e) {
       drupal_set_message(t('Some other error !e', ['!e' => $e->getMessage()]), 'error');
     }
-    return false;
+    return FALSE;
   }
 
   /**
-  * @return SwishClient
-  */
-  public static function create()
-  {
+   * @return SwishClient
+   */
+  public static function create() {
+
     $config = \Drupal::config('swish_payment.settings');
 
     $key = $config->get('private_key');
     $key_pw = $config->get('private_key_pw');
-    if($key_pw)
+    if ($key_pw) {
       $key = [$key, $key_pw];
+    }
 
     $cert = $config->get('client_cert');
     $cert_pw = $config->get('client_cert_pw');
-    if($cert_pw)
+    if ($cert_pw) {
       $cert = [$cert, $cert_pw];
+    }
 
     $liveMode = $config->get('live_mode');
 
@@ -147,29 +164,34 @@ class SwishClient {
     $root_ca = $config->get('ca_cert');
 
     $cconfig = [
-        'http_errors' => false,
-        'verify' => ($root_ca ? $root_ca : $ca_verification),
-        'cert' => $cert,
-        'ssl_key' => $key,
-        'handler' => HandlerStack::create(new CurlHandler()),
+      'http_errors' => FALSE,
+      'verify' => ($root_ca ? $root_ca : $ca_verification),
+      'cert' => $cert,
+      'ssl_key' => $key,
+      'handler' => HandlerStack::create(new CurlHandler()),
     ];
-    $guzzle = new \GuzzleHttp\Client($cconfig);
+    $guzzle = new Client($cconfig);
     return new SwishClient($guzzle, $liveMode);
   }
 
   /**
-   * @param string $method HTTP-method
-   * @param string $endpoint Service endpoint to be called
-   * @param mixed $data any json_encode accepted data
+   * @param string $method
+   *   HTTP-method.
+   * @param string $endpoint
+   *   Service endpoint to be called.
+   * @param mixed $data
+   *   any json_encode accepted data.
    * @return Guzzle\Http\Message\Response
    */
-  protected function sendRequest($method, $endpoint, $data = null)
-  {
-    $return = false;
-    if($data)
+  protected function sendRequest($method, $endpoint, $data = NULL) {
+
+    $return = FALSE;
+    if ($data) {
       $return = $this->client->request($method, $this->baseURL . $endpoint, ['json' => $data]);
-    else
+    }
+    else {
       $return = $this->client->request($method, $this->baseURL . $endpoint);
+    }
     return $return;
   }
 
@@ -177,13 +199,15 @@ class SwishClient {
    * @param string $phoneNo
    * @return string
    */
-  protected static function normalizePhoneNo($phoneNo)
-  {
+  protected static function normalizePhoneNo($phoneNo) {
+
     $phoneNo = preg_replace("/[^0-9]*/", "", $phoneNo);
-    if(strpos($phoneNo, "0") === 0)
+    if (strpos($phoneNo, "0") === 0) {
       $phoneNo = substr($phoneNo, 1);
-    if(strpos($phoneNo, "46") === FALSE)
-      $phoneNo = "46".$phoneNo;
+    }
+    if (strpos($phoneNo, "46") === FALSE) {
+      $phoneNo = "46" . $phoneNo;
+    }
     return $phoneNo;
   }
 
@@ -191,10 +215,10 @@ class SwishClient {
    * @param string $phoneNo
    * @return string
    */
-  public static function validatePhoneNo($phoneNo)
-  {
+  public static function validatePhoneNo($phoneNo) {
+
     $phoneNo = self::normalizePhoneNo($phoneNo);
-    return strlen($phoneNo)>=8 && strlen($phoneNo)<=15;
+    return strlen($phoneNo) >= 8 && strlen($phoneNo) <= 15;
   }
 
 }
diff --git a/src/SwishTransactionAccessControlHandler.php b/src/SwishTransactionAccessControlHandler.php
old mode 100644
new mode 100755
diff --git a/src/SwishTransactionHtmlRouteProvider.php b/src/SwishTransactionHtmlRouteProvider.php
old mode 100644
new mode 100755
diff --git a/src/SwishTransactionListBuilder.php b/src/SwishTransactionListBuilder.php
old mode 100644
new mode 100755
index 9eeb88a..1877e59
--- a/src/SwishTransactionListBuilder.php
+++ b/src/SwishTransactionListBuilder.php
@@ -34,9 +34,9 @@ class SwishTransactionListBuilder extends EntityListBuilder {
     $row['transaction_id'] = $this->l(
       $entity->label(),
       new Url(
-        'entity.swish_transaction.edit_form', array(
+        'entity.swish_transaction.edit_form', [
           'swish_transaction' => $entity->id(),
-        )
+        ]
       )
     );
     return $row + parent::buildRow($entity);
diff --git a/src/Tests/LoadTest.php b/src/Tests/LoadTest.php
old mode 100644
new mode 100755
index 495ce06..2a5a9be
--- a/src/Tests/LoadTest.php
+++ b/src/Tests/LoadTest.php
@@ -10,7 +10,7 @@ use Drupal\simpletest\WebTestBase;
  *
  * @group swish_payment
  */
-class LoadTest extends WebTestBase{
+class LoadTest extends WebTestBase {
 
   /**
    * Modules to enable.
diff --git a/swish_payment.info.yml b/swish_payment.info.yml
old mode 100644
new mode 100755
diff --git a/swish_payment.libraries.yml b/swish_payment.libraries.yml
old mode 100644
new mode 100755
diff --git a/swish_payment.links.action.yml b/swish_payment.links.action.yml
old mode 100644
new mode 100755
diff --git a/swish_payment.links.menu.yml b/swish_payment.links.menu.yml
old mode 100644
new mode 100755
diff --git a/swish_payment.links.task.yml b/swish_payment.links.task.yml
old mode 100644
new mode 100755
index 6856d04..58a872f
--- a/swish_payment.links.task.yml
+++ b/swish_payment.links.task.yml
@@ -19,4 +19,3 @@ entity.swish_transaction.delete_form:
   base_route:  entity.swish_transaction.canonical
   title: Delete
   weight: 10
-
diff --git a/swish_payment.module b/swish_payment.module
old mode 100644
new mode 100755
diff --git a/swish_payment.permissions.yml b/swish_payment.permissions.yml
old mode 100644
new mode 100755
diff --git a/swish_payment.routing.yml b/swish_payment.routing.yml
old mode 100644
new mode 100755
index d5588d5..2b4f85e
--- a/swish_payment.routing.yml
+++ b/swish_payment.routing.yml
@@ -49,4 +49,3 @@ swish_payment.swish_payment_form:
     _title: 'Submit a Swish payment'
   requirements:
     _access: 'TRUE'
-
diff --git a/swish_transaction.page.inc b/swish_transaction.page.inc
old mode 100644
new mode 100755
diff --git a/templates/swish_transaction.html.twig b/templates/swish_transaction.html.twig
old mode 100644
new mode 100755
