diff --git a/.gitignore b/.gitignore
index 84f097d4972a400c17b526ea6bbb92566f45add0..6bde92f3c292f98a806c0a51719f9fce8c006029 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,3 @@
-.gitignore
 /log/
 /config/
 /metadata/
@@ -9,12 +8,16 @@
 /www/assets/css/*.css
 /www/assets/css/*.map
 
-!config/.gitkeep
-!metadata/.gitkeep
+!/config/.gitkeep
+!/metadata/.gitkeep
+!/cache/.gitkeep
+!/locales/.gitkeep
+!/www/assets/fonts/.gitkeep
+!/www/assets/js/.gitkeep
+!/www/assets/css/.gitkeep
 
-# https://www.gitignore.io/api/osx,windows,linux,netbeans,sublimetext,composer,phpstorm,vagrant
-# Created by https://www.gitignore.io
 
+# https://www.gitignore.io/api/osx,windows,linux,netbeans,sublimetext,composer,phpstorm,vagrant
 # Created by https://www.gitignore.io
 
 ### OSX ###
diff --git a/docs/simplesamlphp-install.md b/docs/simplesamlphp-install.md
index 5224adee13a16cbe92a4b40e31bf489e207104e7..ef4123aa3336e27b85e82190e49ce9592f2d03bf 100644
--- a/docs/simplesamlphp-install.md
+++ b/docs/simplesamlphp-install.md
@@ -20,7 +20,7 @@ This document is part of the SimpleSAMLphp documentation suite.
 
 This document covers the installation of the latest stable version of SimpleSAMLphp.
 If you want to install the development version, take a look at the instructions for [installing SimpleSAMLphp from the 
-repository](simplesamlphp-install-repo).
+repository](simplesamlphp-install-repo.md).
 
 
 Prerequisites
@@ -366,16 +366,16 @@ Provider (in order to protect access to an existing application) or an Identity
 a user database where your users can authenticate). Documentation on bridging between federation protocols is found 
 in a separate document.
 
- - [Using SimpleSAMLphp as a Service Provider (SP)](simplesamlphp-sp)
-   + [Remote IdP reference](simplesamlphp-reference-idp-remote)
+ - [Using SimpleSAMLphp as a Service Provider (SP)](simplesamlphp-sp.md)
+   + [Remote IdP reference](simplesamlphp-reference-idp-remote.md)
    + [Connecting to the UK Access Federation or InCommon](simplesamlphp-ukaccess)
- - [Using SimpleSAMLphp as an Identity Provider (IdP)](simplesamlphp-idp)
-   + [Hosted IdP reference](simplesamlphp-reference-idp-hosted)
-   + [Remote SP reference](simplesamlphp-reference-sp-remote)
-   + [Setting up an IdP for G Suite (Google Apps)](simplesamlphp-googleapps)
-   + [Advanced Topics](simplesamlphp-idp-more)
- - [Automated Metadata Management](simplesamlphp-automated_metadata)
- - [Maintenance and configuration](simplesamlphp-maintenance)
+ - [Using SimpleSAMLphp as an Identity Provider (IdP)](simplesamlphp-idp.md)
+   + [Hosted IdP reference](simplesamlphp-reference-idp-hosted.md)
+   + [Remote SP reference](simplesamlphp-reference-sp-remote.md)
+   + [Setting up an IdP for G Suite (Google Apps)](simplesamlphp-googleapps.md)
+   + [Advanced Topics](simplesamlphp-idp-more.md)
+ - [Automated Metadata Management](simplesamlphp-automated_metadata.md)
+ - [Maintenance and configuration](simplesamlphp-maintenance.md)
 
 
 Support
diff --git a/modules/.gitignore b/modules/.gitignore
index f793a754df378e97b5a8f1abd76587c878a8357e..15539d8ea1cb2e4eb111e0af15a3d73eec1de615 100644
--- a/modules/.gitignore
+++ b/modules/.gitignore
@@ -1,43 +1,12 @@
-# Ignore any files or directories in this directory
+# Ignore any file or directory in this directory
 /*
 !/.gitignore
 
 # Explicitly include modules that ship with simplesamlphp
-!/adfs/
 !/admin/
-!/authcrypt/
-!/authfacebook/
-!/authorize/
-!/authtwitter/
-!/authwindowslive/
-!/authX509/
-!/authYubiKey/
-!/cas/
-!/casserver/
-!/cdc/
-!/consent/
-!/consentAdmin/
 !/core/
 !/cron/
-!/discopower/
-!/exampleattributeserver/
 !/exampleauth/
-!/expirycheck/
-!/ldap/
-!/memcacheMonitor/
-!/metarefresh/
 !/multiauth/
-!/negotiate/
-!/oauth/
 !/portal/
-!/preprodwarning/
-!/radius/
-!/riak/
 !/saml/
-!/sanitycheck/
-!/smartattributes/
-!/sqlauth/
-!/statistics/
-
-*/enable
-*/disable