diff --git a/.gitignore b/.gitignore
index 7c2965eda294e35b644059bf493b44aa290aebb6..d2df1da5b5077d597142e85e19812ba900a4e81c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,9 @@
 # User-specific files (MonoDevelop/Xamarin Studio)
 *.userprefs
 
+# Database connection for t4 class generation from database
+**/*.generated.cs
+
 # Build results
 [Dd]ebug/
 [Dd]ebugPublic/
@@ -262,5 +265,6 @@ __pycache__/
 *.pyc
 
 #cake
-tools/
-dist/
\ No newline at end of file
+tools/*
+!tools/packages.config
+dist/
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d01764d1580f214d13d58995d568cf3fc6164ac4..719ebc9c8fda26fc25d7e9d960d529302f72e1bf 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,7 +7,7 @@ stages:
 cake:Test:
   stage: test
   script:
-    - PowerShell .\build.ps1 -Target Test -Configuration Debug
+    - PowerShell .\build.ps1 --Target Test --Configuration Debug
   variables:
     GIT_STRATEGY: clone
   artifacts:
@@ -22,7 +22,7 @@ cake:Test:
 cake:Release:
   stage: release
   script:
-    - PowerShell .\build.ps1 -Target Release -Configuration Release --nugetApiKey="${NUGET_API_KEY}"
+    - PowerShell .\build.ps1 --Target Release --Configuration Release --nugetApiKey="${NUGET_API_KEY}"
   variables:
     GIT_STRATEGY: clone
   dependencies:
@@ -36,7 +36,7 @@ cake:Release:
 cake:Prerelease:
   stage: release
   script:
-    - PowerShell .\build.ps1 -Target Prerelease -Configuration Release
+    - PowerShell .\build.ps1 --Target Prerelease --Configuration Release
   variables:
     GIT_STRATEGY: clone
   dependencies:
@@ -51,7 +51,7 @@ cake:Prerelease:
 cake:GitlabRelease:
   stage: releasetrigger
   script:
-    - PowerShell .\build.ps1 -Target GitlabRelease --GitlabProjectPath="${CI_PROJECT_PATH}" --gitlabProjectId="${CI_PROJECT_ID}" --gitlabToken="${GITLAB_TOKEN}"
+    - PowerShell .\build.ps1 --Target GitlabRelease --GitlabProjectPath="${CI_PROJECT_PATH}" --gitlabProjectId="${CI_PROJECT_ID}" --gitlabToken="${GITLAB_TOKEN}"
   only:
     - master
   except:
@@ -61,7 +61,7 @@ cake:PushToGit:
   stage: schedule
   script:
     - Powershell .\Artifacts\OrganizationLoader.exe --output=Artifacts/index.ttl --force="${04XFQ0F34_FORCE}" --rorId="${04XFQ0F34_ROR_ID}" --username="${04XFQ0F34_USERNAME}" --password="${04XFQ0F34_PASSWORD}" --organizationsLink="${04XFQ0F34_ORGANIZATIONS_LINK}" --employeesLink="${04XFQ0F34_EMPLOYEES_LINK}"
-    - Powershell .\build.ps1 -Target PushToGit --gitlabToken="${GITLAB_TOKEN}" --gitAuthorEmail="${GIT_AUTHOR_EMAIL}" --gitAuthorName="${GIT_AUTHOR_NAME}" --branch="${04XFQ0F34_BRANCH}"
+    - Powershell .\build.ps1 --Target PushToGit --gitlabToken="${GITLAB_TOKEN}" --gitAuthorEmail="${GIT_AUTHOR_EMAIL}" --gitAuthorName="${GIT_AUTHOR_NAME}" --branch="${04XFQ0F34_BRANCH}"
   dependencies:
     - cake:Prerelease
   artifacts:
diff --git a/OrganizationLoader.Tests/Properties/AssemblyInfo.cs b/OrganizationLoader.Tests/Properties/AssemblyInfo.cs
deleted file mode 100644
index 867b8d88b92ba3777a9de364f1870dab73c662f0..0000000000000000000000000000000000000000
--- a/OrganizationLoader.Tests/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("OrganizationLoader.Tests")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("OrganizationLoader.Tests")]
-[assembly: AssemblyCopyright("Copyright ©  2020")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components.  If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("03640d83-d935-41be-80a7-7c723fbf58b4")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OrganizationLoader/Properties/AssemblyInfo.cs b/OrganizationLoader/Properties/AssemblyInfo.cs
deleted file mode 100644
index 5f45db021da356da546639f83bc6f78af4194eae..0000000000000000000000000000000000000000
--- a/OrganizationLoader/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("OrganizationLoader")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("OrganizationLoader")]
-[assembly: AssemblyCopyright("Copyright ©  2020")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components.  If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("74141db8-e6ae-49f7-8e99-33ceafb92729")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/build.cake b/build.cake
index 5b84f670a6e9982304c04d74ecac855fe6e9e37f..9f060a4ba699a17f3bcb659a0ea119dae38140b9 100644
--- a/build.cake
+++ b/build.cake
@@ -2,9 +2,9 @@
 #tool nuget:?package=vswhere&version=2.8.4
 #tool nuget:?package=GitVersion.CommandLine&version=5.1.3
 
-#addin nuget:https://api.nuget.org/v3/index.json?package=Cake.Json&version=4.0.0
+#addin nuget:https://api.nuget.org/v3/index.json?package=Cake.Json&version=6.0.1
 #addin nuget:https://api.nuget.org/v3/index.json?package=Newtonsoft.Json&version=11.0.2
-#addin nuget:https://api.nuget.org/v3/index.json?package=Cake.FileHelpers&version=3.2.1
+#addin nuget:https://api.nuget.org/v3/index.json?package=Cake.FileHelpers&version=4.0.1
 
 using System.Net;
 using System.Net.Http;
@@ -374,7 +374,6 @@ Task("PushToGit")
 	}
 });
 
-
 Task("Prerelease")
 .IsDependentOn("Build")
 .IsDependentOn("CopyToArtifacts")
diff --git a/build.ps1 b/build.ps1
index 7f1f813d74cf6c0826517482757c38b86e0467b3..f83382e8e4092ba6cf32a47f9dfa4e211c878430 100644
--- a/build.ps1
+++ b/build.ps1
@@ -1,3 +1,24 @@
+#The MIT License (MIT)
+#
+#Copyright (c) 2014 - 2016 Patrik Svensson, Mattias Karlsson, Gary Ewan Park and contributors
+#
+#Permission is hereby granted, free of charge, to any person obtaining a copy of
+#this software and associated documentation files (the "Software"), to deal in
+#the Software without restriction, including without limitation the rights to
+#use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+#the Software, and to permit persons to whom the Software is furnished to do so,
+#subject to the following conditions:
+#
+#The above copyright notice and this permission notice shall be included in all
+#copies or substantial portions of the Software.
+#
+#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+#FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+#COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+#IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+#CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
 ##########################################################################
 # This is the Cake bootstrapper script for PowerShell.
 # This file was downloaded from https://github.com/cake-build/resources
@@ -25,6 +46,10 @@ Specifies the amount of information to be displayed.
 Shows description about tasks.
 .PARAMETER DryRun
 Performs a dry run.
+.PARAMETER Experimental
+Uses the nightly builds of the Roslyn script engine.
+.PARAMETER Mono
+Uses the Mono Compiler rather than the Roslyn script engine.
 .PARAMETER SkipToolPackageRestore
 Skips restoring of packages.
 .PARAMETER ScriptArgs
@@ -45,28 +70,13 @@ Param(
     [switch]$ShowDescription,
     [Alias("WhatIf", "Noop")]
     [switch]$DryRun,
+    [switch]$Experimental,
+    [switch]$Mono,
     [switch]$SkipToolPackageRestore,
     [Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
     [string[]]$ScriptArgs
 )
 
-# Attempt to set highest encryption available for SecurityProtocol.
-# PowerShell will not set this by default (until maybe .NET 4.6.x). This
-# will typically produce a message for PowerShell v2 (just an info
-# message though)
-try {
-    # Set TLS 1.2 (3072), then TLS 1.1 (768), then TLS 1.0 (192), finally SSL 3.0 (48)
-    # Use integers because the enumeration values for TLS 1.2 and TLS 1.1 won't
-    # exist in .NET 4.0, even though they are addressable if .NET 4.5+ is
-    # installed (.NET 4.5 is an in-place upgrade).
-    # PowerShell Core already has support for TLS 1.2 so we can skip this if running in that.
-    if (-not $IsCoreCLR) {
-        [System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48
-    }
-  } catch {
-    Write-Output 'Unable to set PowerShell to use TLS 1.2 and TLS 1.1 due to old .NET Framework installed. If you see underlying connection closed or trust errors, you may need to upgrade to .NET Framework 4.5+ and PowerShell v3'
-  }
-
 [Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-Null
 function MD5HashFile([string] $filePath)
 {
@@ -96,7 +106,7 @@ function GetProxyEnabledWebClient
 {
     $wc = New-Object System.Net.WebClient
     $proxy = [System.Net.WebRequest]::GetSystemWebProxy()
-    $proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials
+    $proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials        
     $wc.Proxy = $proxy
     return $wc
 }
@@ -121,16 +131,15 @@ $MODULES_PACKAGES_CONFIG = Join-Path $MODULES_DIR "packages.config"
 # Make sure tools folder exists
 if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) {
     Write-Verbose -Message "Creating tools directory..."
-    New-Item -Path $TOOLS_DIR -Type Directory | Out-Null
+    New-Item -Path $TOOLS_DIR -Type directory | out-null
 }
 
 # Make sure that packages.config exist.
 if (!(Test-Path $PACKAGES_CONFIG)) {
-    Write-Verbose -Message "Downloading packages.config..."
-    try {
+    Write-Verbose -Message "Downloading packages.config..."    
+    try {        
         $wc = GetProxyEnabledWebClient
-        $wc.DownloadFile("https://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG)
-    } catch {
+        $wc.DownloadFile("https://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG) } catch {
         Throw "Could not download packages.config."
     }
 }
@@ -158,12 +167,7 @@ if (!(Test-Path $NUGET_EXE)) {
 }
 
 # Save nuget.exe path to environment to be available to child processed
-$env:NUGET_EXE = $NUGET_EXE
-$env:NUGET_EXE_INVOCATION = if ($IsLinux -or $IsMacOS) {
-    "mono `"$NUGET_EXE`""
-} else {
-    "`"$NUGET_EXE`""
-}
+$ENV:NUGET_EXE = $NUGET_EXE
 
 # Restore tools from NuGet?
 if(-Not $SkipToolPackageRestore.IsPresent) {
@@ -171,17 +175,15 @@ if(-Not $SkipToolPackageRestore.IsPresent) {
     Set-Location $TOOLS_DIR
 
     # Check for changes in packages.config and remove installed tools if true.
-    [string] $md5Hash = MD5HashFile $PACKAGES_CONFIG
+    [string] $md5Hash = MD5HashFile($PACKAGES_CONFIG)
     if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or
-    ($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) {
+      ($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) {
         Write-Verbose -Message "Missing or changed package.config hash..."
-        Get-ChildItem -Exclude packages.config,nuget.exe,Cake.Bakery |
-        Remove-Item -Recurse
+        Remove-Item * -Recurse -Exclude packages.config,nuget.exe
     }
 
     Write-Verbose -Message "Restoring tools from NuGet..."
-    
-    $NuGetOutput = Invoke-Expression "& $env:NUGET_EXE_INVOCATION install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`""
+    $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`""
 
     if ($LASTEXITCODE -ne 0) {
         Throw "An error occurred while restoring NuGet tools."
@@ -190,7 +192,7 @@ if(-Not $SkipToolPackageRestore.IsPresent) {
     {
         $md5Hash | Out-File $PACKAGES_CONFIG_MD5 -Encoding "ASCII"
     }
-    Write-Verbose -Message ($NuGetOutput | Out-String)
+    Write-Verbose -Message ($NuGetOutput | out-string)
 
     Pop-Location
 }
@@ -201,13 +203,13 @@ if (Test-Path $ADDINS_PACKAGES_CONFIG) {
     Set-Location $ADDINS_DIR
 
     Write-Verbose -Message "Restoring addins from NuGet..."
-    $NuGetOutput = Invoke-Expression "& $env:NUGET_EXE_INVOCATION install -ExcludeVersion -OutputDirectory `"$ADDINS_DIR`""
+    $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$ADDINS_DIR`""
 
     if ($LASTEXITCODE -ne 0) {
         Throw "An error occurred while restoring NuGet addins."
     }
 
-    Write-Verbose -Message ($NuGetOutput | Out-String)
+    Write-Verbose -Message ($NuGetOutput | out-string)
 
     Pop-Location
 }
@@ -218,13 +220,13 @@ if (Test-Path $MODULES_PACKAGES_CONFIG) {
     Set-Location $MODULES_DIR
 
     Write-Verbose -Message "Restoring modules from NuGet..."
-    $NuGetOutput = Invoke-Expression "& $env:NUGET_EXE_INVOCATION install -ExcludeVersion -OutputDirectory `"$MODULES_DIR`""
+    $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$MODULES_DIR`""
 
     if ($LASTEXITCODE -ne 0) {
         Throw "An error occurred while restoring NuGet modules."
     }
 
-    Write-Verbose -Message ($NuGetOutput | Out-String)
+    Write-Verbose -Message ($NuGetOutput | out-string)
 
     Pop-Location
 }
@@ -234,11 +236,6 @@ if (!(Test-Path $CAKE_EXE)) {
     Throw "Could not find Cake.exe at $CAKE_EXE"
 }
 
-$CAKE_EXE_INVOCATION = if ($IsLinux -or $IsMacOS) {
-    "mono `"$CAKE_EXE`""
-} else {
-    "`"$CAKE_EXE`""
-}
 
 
 # Build Cake arguments
@@ -248,9 +245,11 @@ if ($Configuration) { $cakeArguments += "-configuration=$Configuration" }
 if ($Verbosity) { $cakeArguments += "-verbosity=$Verbosity" }
 if ($ShowDescription) { $cakeArguments += "-showdescription" }
 if ($DryRun) { $cakeArguments += "-dryrun" }
+if ($Experimental) { $cakeArguments += "-experimental" }
+if ($Mono) { $cakeArguments += "-mono" }
 $cakeArguments += $ScriptArgs
 
 # Start Cake
 Write-Host "Running build script..."
-Invoke-Expression "& $CAKE_EXE_INVOCATION $($cakeArguments -join " ")"
+&$CAKE_EXE $cakeArguments
 exit $LASTEXITCODE
diff --git a/OrganizationLoader.Tests/OrganizationLoader.Tests.csproj b/src/OrganizationLoader.Tests/OrganizationLoader.Tests.csproj
similarity index 100%
rename from OrganizationLoader.Tests/OrganizationLoader.Tests.csproj
rename to src/OrganizationLoader.Tests/OrganizationLoader.Tests.csproj
diff --git a/OrganizationLoader.Tests/OrganizationLoaderTests.cs b/src/OrganizationLoader.Tests/OrganizationLoaderTests.cs
similarity index 100%
rename from OrganizationLoader.Tests/OrganizationLoaderTests.cs
rename to src/OrganizationLoader.Tests/OrganizationLoaderTests.cs
diff --git a/src/OrganizationLoader.Tests/Properties/AssemblyInfo.cs b/src/OrganizationLoader.Tests/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000000000000000000000000000000000000..01c06bc88100b71301e1bf35730738aaddf50a9c
--- /dev/null
+++ b/src/OrganizationLoader.Tests/Properties/AssemblyInfo.cs
@@ -0,0 +1,16 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by Cake.
+// </auto-generated>
+//------------------------------------------------------------------------------
+using System.Reflection;
+
+[assembly: AssemblyTitle("OrganizationLoader.Tests")]
+[assembly: AssemblyDescription("OrganizationLoader.Tests is a part of the CoScInE group.")]
+[assembly: AssemblyCompany("IT Center, RWTH Aachen University")]
+[assembly: AssemblyProduct("OrganizationLoader.Tests")]
+[assembly: AssemblyVersion("1.2.1")]
+[assembly: AssemblyFileVersion("1.2.1")]
+[assembly: AssemblyInformationalVersion("1.2.1-product-1414-fhp0003")]
+[assembly: AssemblyCopyright("2021 IT Center, RWTH Aachen University")]
+
diff --git a/OrganizationLoader.Tests/app.config b/src/OrganizationLoader.Tests/app.config
similarity index 100%
rename from OrganizationLoader.Tests/app.config
rename to src/OrganizationLoader.Tests/app.config
diff --git a/OrganizationLoader.Tests/packages.config b/src/OrganizationLoader.Tests/packages.config
similarity index 100%
rename from OrganizationLoader.Tests/packages.config
rename to src/OrganizationLoader.Tests/packages.config
diff --git a/OrganizationLoader.sln b/src/OrganizationLoader.sln
similarity index 100%
rename from OrganizationLoader.sln
rename to src/OrganizationLoader.sln
diff --git a/OrganizationLoader/App.config b/src/OrganizationLoader/App.config
similarity index 100%
rename from OrganizationLoader/App.config
rename to src/OrganizationLoader/App.config
diff --git a/OrganizationLoader/Employee.cs b/src/OrganizationLoader/Employee.cs
similarity index 100%
rename from OrganizationLoader/Employee.cs
rename to src/OrganizationLoader/Employee.cs
diff --git a/OrganizationLoader/Organization.cs b/src/OrganizationLoader/Organization.cs
similarity index 100%
rename from OrganizationLoader/Organization.cs
rename to src/OrganizationLoader/Organization.cs
diff --git a/OrganizationLoader/OrganizationLoader.csproj b/src/OrganizationLoader/OrganizationLoader.csproj
similarity index 98%
rename from OrganizationLoader/OrganizationLoader.csproj
rename to src/OrganizationLoader/OrganizationLoader.csproj
index e0cc53b605e144057fcc425bf0a2ab40f9e131fe..f8393370b40b2562ee174911bcec219f80ab172f 100644
--- a/OrganizationLoader/OrganizationLoader.csproj
+++ b/src/OrganizationLoader/OrganizationLoader.csproj
@@ -101,8 +101,10 @@
   <ItemGroup>
     <Compile Include="Employee.cs" />
     <Compile Include="Organization.cs" />
+    <Compile Include="OrganizationMapping.cs" />
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="ResourceType.cs" />
     <Compile Include="Role.cs" />
   </ItemGroup>
   <ItemGroup>
diff --git a/src/OrganizationLoader/OrganizationMapping.cs b/src/OrganizationLoader/OrganizationMapping.cs
new file mode 100644
index 0000000000000000000000000000000000000000..5ccd98a950bc11dc47e2f82edfe5ea2a305d84bd
--- /dev/null
+++ b/src/OrganizationLoader/OrganizationMapping.cs
@@ -0,0 +1,8 @@
+namespace Coscine.OrganizationLoader
+{
+    public class OrganizationMapping
+    {
+        public string EntityId { get; set; }
+        public string RorId { get; set; }
+    }
+}
diff --git a/OrganizationLoader/Program.cs b/src/OrganizationLoader/Program.cs
similarity index 81%
rename from OrganizationLoader/Program.cs
rename to src/OrganizationLoader/Program.cs
index 96be80a1ee41aa513b23e26a9a477f6736d7849b..2096ec2536694b79563aa75751d7a95f614ed200 100644
--- a/OrganizationLoader/Program.cs
+++ b/src/OrganizationLoader/Program.cs
@@ -14,7 +14,43 @@ namespace Coscine.OrganizationLoader
 {
     public class Program
     {
-        public static HttpClient httpClient;
+        private static HttpClient _httpClient;
+
+        private static readonly List<ResourceType> _resourceTypes = new List<ResourceType> 
+        { 
+            new ResourceType
+            { 
+                Name ="rds", 
+                Quota = 25,
+                HasQuota = true,
+            },
+            new ResourceType
+            {  Name ="rdss3",
+                Quota = 0,
+                HasQuota = true,
+            },
+            new ResourceType
+            {  Name = "linked",
+               Quota = -1,
+               HasQuota = false,
+            },
+        };
+
+        // taken from https://tools.aai.dfn.de/entities/ and https://git.rwth-aachen.de/coscine/graphs/organizations/-/raw/master/ROR/index.ttl
+        private static readonly List<OrganizationMapping> _organizationMappings = new List<OrganizationMapping> 
+        { 
+            new OrganizationMapping 
+            { 
+                RorId = "https://ror.org/04xfq0f34", 
+                EntityId = "https://login.rz.rwth-aachen.de/shibboleth",
+            },
+            new OrganizationMapping
+            {
+                RorId = "https://ror.org/04xfq0f34", 
+                EntityId = "https://login-test.rz.rwth-aachen.de/shibboleth",
+            },
+        };
+
         static void Main(string[] args)
         {
             bool showHelp = false;
@@ -25,9 +61,10 @@ namespace Coscine.OrganizationLoader
             string employeesLink = null;
             string rorId = null;
             string output = null;
-        var optionSet = new OptionSet() {
+
+            var optionSet = new OptionSet() {
                 { "force=",  "Skip checks for to many or no changes in the exports.",
-                   x => force = x == null ? false : x == "true" },
+                   x => force = x != null && x == "true" },
                 { "username=",  "Username for the export. If none is provided, the consul value is used.",
                    x => username = x },
                 { "password=",  "Password for the export. If none is provided, the consul value is used.",
@@ -108,9 +145,9 @@ namespace Coscine.OrganizationLoader
                 Console.WriteLine("No value for password provided.");
             }
 
-            httpClient = new HttpClient();
+            _httpClient = new HttpClient();
             // Create a basic Authentication header
-            httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}")));
+            _httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}")));
 
             var previousEmployeeCountString = configuration.GetString("coscine/global/organizations/rwth/files/employees/number_of_entries");
             var previousEmployeeCount = previousEmployeeCountString != null ? int.Parse(previousEmployeeCountString) : -1;
@@ -123,6 +160,7 @@ namespace Coscine.OrganizationLoader
 
             string organizationsString;
             string employeesString;
+
             try
             {
                 Console.WriteLine("Downloading...");
@@ -135,6 +173,7 @@ namespace Coscine.OrganizationLoader
                 Console.WriteLine($"Failed to download exports: {e.Message}");
                 return;
             }
+
             Console.WriteLine("Parsing...");
 
             var organizations = ParseOrganizations(organizationsString);
@@ -176,10 +215,10 @@ namespace Coscine.OrganizationLoader
 
             Console.WriteLine("Saving to Consul...");
 
-            configuration.PutAndWait("coscine/global/organizations/rwth/files/organizations/number_of_entries", organizations.Count().ToString());
-            configuration.PutAndWait("coscine/global/organizations/rwth/files/employees/number_of_entries", employees.Count().ToString());
-            configuration.PutAndWait("coscine/global/organizations/rwth/files/organizations/sha", organizationsSha);
-            configuration.PutAndWait("coscine/global/organizations/rwth/files/employees/sha", employeesSha);
+            configuration.Put("coscine/global/organizations/rwth/files/organizations/number_of_entries", organizations.Count().ToString());
+            configuration.Put("coscine/global/organizations/rwth/files/employees/number_of_entries", employees.Count().ToString());
+            configuration.Put("coscine/global/organizations/rwth/files/organizations/sha", organizationsSha);
+            configuration.Put("coscine/global/organizations/rwth/files/employees/sha", employeesSha);
 
             Console.WriteLine("Finished");
         }
@@ -233,7 +272,7 @@ namespace Coscine.OrganizationLoader
 
         public static string DownloadExport(string link)
         {
-            using (var response = httpClient.GetStringAsync(link))
+            using (var response = _httpClient.GetStringAsync(link))
             {
                 return response.Result;
             }
@@ -278,6 +317,7 @@ namespace Coscine.OrganizationLoader
                 streamWriter.WriteLine(@"@prefix org: <http://www.w3.org/ns/org#> .");
                 streamWriter.WriteLine(@"@prefix dcterms: <http://purl.org/dc/terms/> .");
                 streamWriter.WriteLine(@"@prefix foaf: <http://xmlns.com/foaf/0.1/> .");
+                streamWriter.WriteLine(@"@prefix coscineresource: <https://purl.org/coscine/terms/resource#> .");
                 streamWriter.WriteLine();
                 streamWriter.WriteLine($"<{rorId}>");
                 streamWriter.WriteLine(@"    dcterms:publisher <https://itc.rwth-aachen.de/> ;");
@@ -332,6 +372,25 @@ namespace Coscine.OrganizationLoader
                     streamWriter.WriteLine(".");
                 }
 
+                // Default Quoting
+                foreach (var resourceType in _resourceTypes)
+                {
+                    streamWriter.WriteLine($"<{rorId}> coscineresource:typeSpecification [");
+                    streamWriter.WriteLine($@"    coscineresource:type <https://purl.org/coscine/terms/resource/types#{resourceType.Name}>;");
+                    if(resourceType.HasQuota)
+                    {
+                        streamWriter.WriteLine($@"    coscineresource:defaultQuota ""{resourceType.Quota}"";");
+                    }
+                    streamWriter.WriteLine("].");
+                }
+
+                // Ror to entity mapping
+                foreach (var organizationMapping in _organizationMappings)
+                {
+                    // Specs require the org identifier to be a literal, even if it is an url.
+                    streamWriter.WriteLine($@"<{organizationMapping.RorId}> org:identifier ""{organizationMapping.EntityId}"" .");
+                }
+
                 streamWriter.Flush();
 
                 return Encoding.UTF8.GetString(memoryStream.ToArray());
diff --git a/src/OrganizationLoader/Properties/AssemblyInfo.cs b/src/OrganizationLoader/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000000000000000000000000000000000000..d6d64cbbcd4f451a838b3b3743ee2bb36b4dc2a5
--- /dev/null
+++ b/src/OrganizationLoader/Properties/AssemblyInfo.cs
@@ -0,0 +1,16 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by Cake.
+// </auto-generated>
+//------------------------------------------------------------------------------
+using System.Reflection;
+
+[assembly: AssemblyTitle("OrganizationLoader")]
+[assembly: AssemblyDescription("OrganizationLoader is a part of the CoScInE group.")]
+[assembly: AssemblyCompany("IT Center, RWTH Aachen University")]
+[assembly: AssemblyProduct("OrganizationLoader")]
+[assembly: AssemblyVersion("1.2.1")]
+[assembly: AssemblyFileVersion("1.2.1")]
+[assembly: AssemblyInformationalVersion("1.2.1-product-1414-fhp0003")]
+[assembly: AssemblyCopyright("2021 IT Center, RWTH Aachen University")]
+
diff --git a/src/OrganizationLoader/ResourceType.cs b/src/OrganizationLoader/ResourceType.cs
new file mode 100644
index 0000000000000000000000000000000000000000..50459db475dda66f7ae3c29f034965ecc068da94
--- /dev/null
+++ b/src/OrganizationLoader/ResourceType.cs
@@ -0,0 +1,9 @@
+namespace Coscine.OrganizationLoader
+{
+    public class ResourceType
+    {
+        public string Name { get; set; }
+        public int Quota { get; set; }
+        public bool HasQuota { get; set; }
+    }
+}
diff --git a/OrganizationLoader/Role.cs b/src/OrganizationLoader/Role.cs
similarity index 100%
rename from OrganizationLoader/Role.cs
rename to src/OrganizationLoader/Role.cs
diff --git a/OrganizationLoader/packages.config b/src/OrganizationLoader/packages.config
similarity index 100%
rename from OrganizationLoader/packages.config
rename to src/OrganizationLoader/packages.config
diff --git a/tools/packages.config b/tools/packages.config
new file mode 100644
index 0000000000000000000000000000000000000000..0328dfb13c9a9b74920150725d27cd0e231c4815
--- /dev/null
+++ b/tools/packages.config
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+    <package id="Cake" version="1.0.0" />
+</packages>