diff --git a/docs/simplesamlphp-idp.md b/docs/simplesamlphp-idp.md
index 2a8cd83ff87368b36d574283537278a98db7978b..f30787cfd1966934797e2289ed65d86f67e61344 100644
--- a/docs/simplesamlphp-idp.md
+++ b/docs/simplesamlphp-idp.md
@@ -110,7 +110,7 @@ In this setup, this file should contain a single entry:
 		],
 	];
 
-This configuration creates two users - `student` and `employee`, with the passwords `studentpass` and `employeepass`. The username and password is stored in the array index (`student:studentpass` for the `student`-user. The attributes for each user is configured in the array referenced by the index. For the student user, these are:
+This configuration creates two users - `student` and `employee`, with the passwords `studentpass` and `employeepass`. The username and password are stored in the array index (`student:studentpass` for the `student`-user). The attributes for each user are configured in the array referenced by the index. So for the student user, these are:
 
 	[
 		'uid' => ['student'],
@@ -120,10 +120,10 @@ This configuration creates two users - `student` and `employee`, with the passwo
 The attributes will be returned by the IdP when the user logs on.
 
 
-Creating a SSL self signed certificate
---------------------------------------
+Creating a self signed certificate
+----------------------------------
 
-Here is an example of an `openssl`-command which can be used to generate a new private key key and the corresponding self-signed certificate.
+The IdP needs a certificate to sign its SAML assertions with. Here is an example of an `openssl`-command which can be used to generate a new private key key and the corresponding self-signed certificate.
 
 This key and certificate can be used to sign SAML messages:
 
diff --git a/docs/simplesamlphp-install.md b/docs/simplesamlphp-install.md
index 25f73755a81d07a4c47cfef7f5f673578090ea3f..fef5b14c8fe94219cee7bd635dc447cdc87626b3 100644
--- a/docs/simplesamlphp-install.md
+++ b/docs/simplesamlphp-install.md
@@ -130,7 +130,7 @@ one possible configuration.
 Find the Apache configuration file for the virtual hosts where you want to run SimpleSAMLphp. The configuration may
 look like this:
 
-```apacheconfig
+```
     <VirtualHost *>
             ServerName service.example.com
             DocumentRoot /var/www/service.example.com
@@ -140,15 +140,7 @@ look like this:
             Alias /simplesaml /var/simplesamlphp/www
 
             <Directory /var/simplesamlphp/www>
-                <IfModule !mod_authz_core.c>
-                # For Apache 2.2:
-                Order allow,deny
-                Allow from all
-                </IfModule>
-                <IfModule mod_authz_core.c>
-                # For Apache 2.4:
                 Require all granted
-                </IfModule>
             </Directory>
     </VirtualHost>
 ```
@@ -161,7 +153,7 @@ SimpleSAMLphp as described in
 [the section called “SimpleSAMLphp configuration: config.php”](#sect.config "SimpleSAMLphp configuration: config.php").
 Here is an example of how this configuration may look like in `config.php`:
 
-```php
+```
 $config = [
     [...]
     'baseurlpath' => 'simplesaml/',
@@ -230,7 +222,7 @@ There are a few steps that you should complete in the main configuration file, `
 -  Set the `baseurlpath` configuration option. Make it point to the canonical URL of your deployment, where
    SimpleSAMLphp can be reached:
    
-   ```php
+   ```
        'baseurlpath' => 'https://your.canonical.host.name/simplesaml/',
    ```
 
@@ -245,7 +237,7 @@ There are a few steps that you should complete in the main configuration file, `
    Hashed passwords can also be used here. See the [`authcrypt`](../modules/authcrypt/docs/authcrypt.md) documentation
    for more information.
 
-   ```php
+   ```
        'auth.adminpassword' => 'setnewpasswordhere',
    ```
 
@@ -259,7 +251,7 @@ There are a few steps that you should complete in the main configuration file, `
 
    Here is an example of the configuration option:
 
-   ```php
+   ```
        'secretsalt' => 'randombytesinsertedhere',
    ```
 
@@ -276,7 +268,7 @@ There are a few steps that you should complete in the main configuration file, `
 -  Set technical contact information. This information will be available in the generated metadata. The e-mail address
    will also be used for receiving error reports sent automatically by SimpleSAMLphp. Here is an example:
 
-   ```php
+   ```
        'technicalcontact_name' => 'John Smith',
        'technicalcontact_email' => 'john.smith@example.com',
    ```
@@ -284,13 +276,13 @@ There are a few steps that you should complete in the main configuration file, `
 -  If you use SimpleSAMLphp in a country where English is not widespread, you may want to change the default language
    from English to something else:
 
-   ```php
+   ```
        'language.default' => 'no',
    ```
 
 -  Set your timezone
 
-   ```php
+   ```
        'timezone' => 'Europe/Oslo',
    ```
 
@@ -314,7 +306,7 @@ Enabling and disabling modules
 If you want to enable some of the modules that are installed with SimpleSAMLphp, but are disabled by default, you 
 can do that in the configuration:
 
-```php
+```
     'module.enable' => [
          'exampleauth' => true, // Setting to TRUE enables.
          'saml' => false, // Setting to FALSE disables.
@@ -436,8 +428,8 @@ As an example, let's see how you can install SimpleSAMLphp in your home director
 3. Next, you need to set the `baseurlpath` configuration option with the URL pointing to the `simplesaml` link you 
 just created in your `public_html` directory. For example, if your home directory is reachable in
 `https://host.example/~myaccount/`, set the base URL path accordingly:
- 
-   ```php
+
+   ```
        'baseurlpath' => 'https://host.example/~myaccount/simplesaml/', 
    ```
 
@@ -467,13 +459,13 @@ Now, we need to make a few configuration changes. First, let's edit `~/public_ht
 
 Change the two lines from:
 
-```php
+```
     require_once(dirname(dirname(__FILE__)) . '/lib/_autoload.php');
 ```
 
 to something like:
 
-```php
+```
     require_once(dirname(dirname(dirname(__FILE__))) . '/lib/_autoload.php');
 ```
 
diff --git a/docs/simplesamlphp-theming.md b/docs/simplesamlphp-theming.md
index a6eb0b6230ed55b7d69a11eb284a9a3b3d53396f..041b29f1e7ed5e74e88338f9903843c0c0404462 100644
--- a/docs/simplesamlphp-theming.md
+++ b/docs/simplesamlphp-theming.md
@@ -107,13 +107,13 @@ modules
 ```
 
 Reference these resources in your custom PHP templates under `themes/fancytheme` by using a generator for the URL:
-```php
+```
 <?php echo SimpleSAML\Module::getModuleURL('mymodule/logo.png'); ?>
 ```
 
 Example for a custom CSS stylesheet file:
-```html
-<link rel="stylesheet" type="text/css" href="<?php echo SimpleSAML\Module::getModuleURL('mymodule/style.css'); ?>" />
+```
+<link rel="stylesheet" href="<?php echo SimpleSAML\Module::getModuleURL('mymodule/style.css'); ?>">
 ```
 
 Migrating to Twig templates
diff --git a/docs/simplesamlphp-upgrade-notes-1.14.md b/docs/simplesamlphp-upgrade-notes-1.14.md
index 9931225c49e46085c52f80ee5a5037862d537059..fdabcdb247f102d9e4538295ff2d3b26b233e3c9 100644
--- a/docs/simplesamlphp-upgrade-notes-1.14.md
+++ b/docs/simplesamlphp-upgrade-notes-1.14.md
@@ -19,7 +19,7 @@ The jQuery version in use has been bumped to the latest 1.8.X version.
 Service Providers using the eduPersonTargetedID attribute, will get a DOMNodeList object instead of the NameID value. In
 order to process the NameID, a SAML2_XML_saml_NameID object can be used:
 
-```php
+```
 $attributes = $as->getAttributes();
 $eptid = $attributes['eduPersonTargetedID'][0]->item(0);
 $nameID = new SAML2_XML_saml_NameID($eptid);
diff --git a/modules/cron/docs/cron.md b/modules/cron/docs/cron.md
index 88630a29b3584d5e3947e3a882fa2b066596ec79..cd315f8a72798b5d7e14d07539fb51214dc2f7f2 100644
--- a/modules/cron/docs/cron.md
+++ b/modules/cron/docs/cron.md
@@ -111,7 +111,7 @@ Below is an example of invoking the script. It will:
 * Run the `cron.php` script with the `hourly` tag
 * Use `nice` to lower the priority below that of web server processes
 
-```bash
+```
 su -s "/bin/sh" \
    -c "nice -n 10 \
        php -d max_execution_time=120 -d memory_limit=600M \
diff --git a/modules/saml/docs/filterscopes.md b/modules/saml/docs/filterscopes.md
index a3c28fa4faaac8cbc044af73c96b7d47811ab510..e930244d82c13ad339fdbd5663eb1a13c8bbb626 100644
--- a/modules/saml/docs/filterscopes.md
+++ b/modules/saml/docs/filterscopes.md
@@ -36,36 +36,36 @@ Examples
 --------
 
 Basic configuration:
-```php
-    'authproc' => array(
-        90 => array(
+```
+    'authproc' => [
+        90 => [
             'class' => 'saml:FilterScopes',
-        ),
-    ),
+        ],
+    [,
 ```
 
 Specify `mail` and `eduPersonPrincipalName` as scoped attributes:
-```php
-    'authproc' => array(
-        90 => array(
+```
+    'authproc' => [
+        90 => [
             'class' => 'saml:FilterScopes',
-            'attributes' => array(
+            'attributes' => [
                 'mail',
                 'eduPersonPrincipalName',
-            ),
-        ),
-    ),
+            ],
+        ],
+    ],
 ```
 
 Specify the same attributes in OID format:
-```php
-    'authproc' => array(
-        90 => array(
+```
+    'authproc' => [
+        90 => [
             'class' => 'saml:FilterScopes',
-            'attributes' => array(
+            'attributes' => [
                 'urn:oid:0.9.2342.19200300.100.1.3',
                 'urn:oid:1.3.6.1.4.1.5923.1.1.1.6',
-            ),
-        ),
-    ),
+            ],
+        ],
+    ],
 ```