diff --git a/config/default.cfg b/config/default.cfg
index daead1b06280a92e192c45c6757b6ffdd29fed5f..f2a73bec9116542e6a01afe08d1d8323a5fabfec 100755
--- a/config/default.cfg
+++ b/config/default.cfg
@@ -13,7 +13,7 @@ cfg <- list()
 #### Main settings ####
 
 #short description of the actual run
-cfg$title <- "welfare_mod_namechange"
+cfg$title <- "default"
 
 # path to the submodel to be used relative to main model folder (e.g."standalone/template.gms")
 #cfg$model <- "main.gms"   #def = "main.gms"
@@ -276,7 +276,7 @@ cfg$gms$cm_bioenergy_tax     <- 1.5     # def <- 1.5
 cfg$gms$cm_bioenergymaxscen  <- 0       # def <- 0
 cfg$gms$c_tradecost_bio      <- 2       # def <- 2
 cfg$gms$cm_LU_emi_scen       <- "SSP2"  # def <- "SSP2"
-cfg$gms$cm_1stgen_phaseout   <- 0       # def <- 0
+cfg$gms$c_1stgen_phaseout   <- 0       # def <- 0
 cfg$gms$cm_cprice_red_factor <- 0.5  	# def = 0.5
 
 cfg$gms$cm_POPscen            <- "pop_SSP2"     # def <- "pop_SSP2"
@@ -550,7 +550,7 @@ cfg$RunsUsingTHISgdxAsBAU <- NA
 #  (SSP1): emissions (from SSP1 scenario in MAgPIE)
 #  (SSP2): emissions (from SSP2 scenario in MAgPIE)
 #  (SSP5): emissions (from SSP5 scenario in MAgPIE)
-# cm_1stgen_phaseout "choose if 1st generation biofuels should phase out after 2030 (deltacap=0)"
+# c_1stgen_phaseout "choose if 1st generation biofuels should phase out after 2030 (deltacap=0)"
 #  (0): 1st generation biofuels after 2020 are fixed at upper limit of resource potential (maxprod)
 #  (1): no new capacities for 1st generation biofuel technologies may be built after 2030 -> phaseout until ~2060
 # cm_POPscen      "Population growth scenarios from UN data and IIASA projection used in SSP"
diff --git a/config/old_scenario_config/scenario_config_EMF33.csv b/config/old_scenario_config/scenario_config_EMF33.csv
index 9a4e6d36d5789723ad35657b399e93bed4d4b4a6..8dd2f9d96d6a5ea2e93f770dbc5ffb159c4737bd 100644
--- a/config/old_scenario_config/scenario_config_EMF33.csv
+++ b/config/old_scenario_config/scenario_config_EMF33.csv
@@ -1,4 +1,4 @@
-title;start;cm_iteration_max;c_solver_try_max;cm_bioenergy_tax;cm_SlowConvergence;optimization;cm_postproc;climate;cm_emiscen;cm_iterative_target_adj;cm_gdximport_target;c_budgetCO2FFI;carbonprice;cm_co2_tax_2020;cm_co2_tax_growth;cm_rcp_scen;cm_POPscen;cm_GDPscen;cm_oil_scen;cm_gas_scen;cm_coal_scen;c_feintensscen;c_techAssumptScen;cm_nucscen;c_abtrdy;c_abtcst;cm_ccsscen;c_bioliqscen;c_bioh2scen;c_ccscapratescen;c_biocostscen;cm_1stgen_phaseout;cm_bioenergymaxscen;cm_fetaxscen;cm_so2tax_scen;cm_multigasscen;c_EARLYRETIRE;cm_OILRETIRE;cm_LU_emi_scen;c_tradecost_bio;c_SSP_forcing_adjust;cm_APscen;cm_startyear;path_gdx;path_gdx_bau;path_gdx_ref;path_gdx_opt;path_mif_bau
+title;start;cm_iteration_max;c_solver_try_max;cm_bioenergy_tax;cm_SlowConvergence;optimization;cm_postproc;climate;cm_emiscen;cm_iterative_target_adj;cm_gdximport_target;c_budgetCO2FFI;carbonprice;cm_co2_tax_2020;cm_co2_tax_growth;cm_rcp_scen;cm_POPscen;cm_GDPscen;cm_oil_scen;cm_gas_scen;cm_coal_scen;c_feintensscen;c_techAssumptScen;cm_nucscen;c_abtrdy;c_abtcst;cm_ccsscen;c_bioliqscen;c_bioh2scen;c_ccscapratescen;c_biocostscen;c_1stgen_phaseout;cm_bioenergymaxscen;cm_fetaxscen;cm_so2tax_scen;cm_multigasscen;c_EARLYRETIRE;cm_OILRETIRE;cm_LU_emi_scen;c_tradecost_bio;c_SSP_forcing_adjust;cm_APscen;cm_startyear;path_gdx;path_gdx_bau;path_gdx_ref;path_gdx_opt;path_mif_bau
 SSP2-R1-BASE-0-full;1;6;3;1.5;on;negishi;0;magicc;1;0;0;0;none;-1;1;rcp26;pop_SSP2;gdp_SSP2;2;2;2;0;1;2;2015;1;1;1;1;1;2;0;0;3;2;2;on;on;SSP2;2;forcing_SSP2;SSP2;2005;;;;;
 SSP2-R1-BASE-0-full-nash;1;6;3;1.5;on;nash;0;magicc;1;0;0;0;none;-1;1;rcp26;pop_SSP2;gdp_SSP2;2;2;2;0;1;2;2015;1;1;1;1;1;2;0;0;3;2;2;on;on;SSP2;2;forcing_SSP2;SSP2;2005;;;;;
 SSP2-R1-P-lo-full;1;6;3;1.5;on;negishi;0;magicc;9;0;0;0;exponential;20;1.03;rcp37;pop_SSP2;gdp_SSP2;2;2;2;0;1;2;2015;1;1;1;1;1;2;0;0;3;2;2;on;on;SSP2;2;forcing_SSP2;SSP2;2020;;;;;
diff --git a/config/old_scenario_config/scenario_config_SSP.csv b/config/old_scenario_config/scenario_config_SSP.csv
index 649965219a952a4a1d6e9c4620c517f5713daba4..d9fcc67588f755dc0b69a365de24843c2c7b5c9a 100644
--- a/config/old_scenario_config/scenario_config_SSP.csv
+++ b/config/old_scenario_config/scenario_config_SSP.csv
@@ -1,4 +1,4 @@
-title;start;cm_iteration_max;c_solver_try_max;cm_bioenergy_tax;cm_SlowConvergence;climate;cm_iterative_target_adj;cm_gdximport_target;optimization;cm_postproc;cm_emiscen;carbonprice;cm_co2_tax_2020;cm_rcp_scen;cm_POPscen;cm_GDPscen;cm_oil_scen;cm_gas_scen;cm_coal_scen;c_feintensscen;c_techAssumptScen;cm_nucscen;c_ccscapratescen;c_biocostscen;cm_1stgen_phaseout;cm_bioenergymaxscen;cm_fetaxscen;cm_so2tax_scen;cm_multigasscen;c_EARLYRETIRE;cm_OILRETIRE;cm_LU_emi_scen;c_tradecost_bio;c_SSP_forcing_adjust;cm_APscen;cm_startyear;cm_stagestart;cm_stageend;c_refcapbnd;c_tau_so2_xmpt;path_gdx;path_gdx_bau;path_gdx_ref;path_gdx_opt;path_mif_bau;path_gdx_SSP2ref
+title;start;cm_iteration_max;c_solver_try_max;cm_bioenergy_tax;cm_SlowConvergence;climate;cm_iterative_target_adj;cm_gdximport_target;optimization;cm_postproc;cm_emiscen;carbonprice;cm_co2_tax_2020;cm_rcp_scen;cm_POPscen;cm_GDPscen;cm_oil_scen;cm_gas_scen;cm_coal_scen;c_feintensscen;c_techAssumptScen;cm_nucscen;c_ccscapratescen;c_biocostscen;c_1stgen_phaseout;cm_bioenergymaxscen;cm_fetaxscen;cm_so2tax_scen;cm_multigasscen;c_EARLYRETIRE;cm_OILRETIRE;cm_LU_emi_scen;c_tradecost_bio;c_SSP_forcing_adjust;cm_APscen;cm_startyear;cm_stagestart;cm_stageend;c_refcapbnd;c_tau_so2_xmpt;path_gdx;path_gdx_bau;path_gdx_ref;path_gdx_opt;path_mif_bau;path_gdx_SSP2ref
 SSP1-Ref-SPA0;1;8;3;1.75;on;off;0;0;negishi;0;1;none;-1;none;pop_SSP1;gdp_SSP1;1;1;1;1;2;2;1;1;1;0;2;4;2;on;off;SSP1;1;forcing_SSP1;SSP1;2005;2020;2040;0;0;/p/projects/ssp/submission_v15_v16/remind16_v15_r6192/output/rem6192_SSP1-Ref-SPA0-rem-5/fulldata.gdx;;;;;
 SSP1-20-SPA0;1;8;3;1.75;on;magicc;2;1;negishi;0;6;none;-1;rcp20;pop_SSP1;gdp_SSP1;1;1;1;1;2;2;1;1;1;0;2;4;2;on;on;SSP1;1;forcing_SSP1;SSP1;2015;2020;2040;0;0;/p/projects/ssp/submission_v15_v16/remind16_v15_r6192/output/rem6192_SSP1-20-SPA0-rem-5/fulldata.gdx;/p/projects/ssp/submission_v15_v16/remind16_v15_r6192/output/rem6192_SSP1-Ref-SPA0-rem-5/fulldata.gdx;;;;
 SSP1-26-SPA0;1;8;3;1.75;on;magicc;2;1;negishi;0;6;none;-1;rcp26;pop_SSP1;gdp_SSP1;1;1;1;1;2;2;1;1;1;0;2;4;2;on;on;SSP1;1;forcing_SSP1;SSP1;2015;2020;2040;0;0;/p/projects/ssp/submission_v15_v16/remind16_v15_r6192/output/rem6192_SSP1-26-SPA0-rem-5/fulldata.gdx;/p/projects/ssp/submission_v15_v16/remind16_v15_r6192/output/rem6192_SSP1-Ref-SPA0-rem-5/fulldata.gdx;;;;
diff --git a/config/old_scenario_config/scenario_config_Validation2018.csv b/config/old_scenario_config/scenario_config_Validation2018.csv
index b7bca2c665512f77fb233a3d451093409bbbd485..20dedffab9ce62ee65040c7d466090f789539cea 100644
--- a/config/old_scenario_config/scenario_config_Validation2018.csv
+++ b/config/old_scenario_config/scenario_config_Validation2018.csv
@@ -1,4 +1,4 @@
-title;start;cm_iteration_max;cm_bioenergy_tax;climate;c_budgetCO2;cm_iterative_target_adj;optimization;transport;buildings;industry;stationary;cm_emiscen;carbonprice;cm_co2_tax_2020;cm_rcp_scen;techpol;cm_multigasscen;cm_POPscen;cm_GDPscen;cm_oil_scen;cm_gas_scen;cm_coal_scen;c_feintensscen;c_techAssumptScen;cm_nucscen;c_ccscapratescen;cm_1stgen_phaseout;cm_fetaxscen;cm_so2tax_scen;cm_OILRETIRE;cm_LU_emi_scen;c_tradecost_bio;c_SSP_forcing_adjust;cm_APscen;c_refcapbnd;c_tau_so2_xmpt;cm_startyear;path_gdx;path_gdx_ref;path_gdx_bau;path_gdx_opt
+title;start;cm_iteration_max;cm_bioenergy_tax;climate;c_budgetCO2;cm_iterative_target_adj;optimization;transport;buildings;industry;stationary;cm_emiscen;carbonprice;cm_co2_tax_2020;cm_rcp_scen;techpol;cm_multigasscen;cm_POPscen;cm_GDPscen;cm_oil_scen;cm_gas_scen;cm_coal_scen;c_feintensscen;c_techAssumptScen;cm_nucscen;c_ccscapratescen;c_1stgen_phaseout;cm_fetaxscen;cm_so2tax_scen;cm_OILRETIRE;cm_LU_emi_scen;c_tradecost_bio;c_SSP_forcing_adjust;cm_APscen;c_refcapbnd;c_tau_so2_xmpt;cm_startyear;path_gdx;path_gdx_ref;path_gdx_bau;path_gdx_opt
 SSP1-Base;0;8;1.75;off;0;0;nash;complex;simple;fixed_shares;off;1;none;-1;none;none;2;pop_SSP1;gdp_SSP1;lowOil;lowGas;lowCoal;1;2;2;1;1;2;4;off;SSP1;1;forcing_SSP1;SSP1;0;0;2005;/p/projects/remind/runs/r7745/output/BAU_Nash_2018-01-18_14.42.32/fulldata.gdx;;;
 SSP1-Ref;0;8;1.75;off;0;3;nash;complex;simple;fixed_shares;off;9;RefPolicies;1;rcp60;RefPolicies;3;pop_SSP1;gdp_SSP1;lowOil;lowGas;lowCoal;1;2;2;1;1;2;4;off;SSP1;1;forcing_SSP1;SSP1;0;0;2025;/p/projects/remind/runs/r7745/output/BAU_Nash_2018-01-18_14.42.32/fulldata.gdx;SSP1-INDC;BAU;
 SSP1-INDC;0;8;1.75;off;0;3;nash;complex;simple;fixed_shares;off;9;NDC;1;rcp45;NDC;3;pop_SSP1;gdp_SSP1;lowOil;lowGas;lowCoal;1;2;2;1;1;2;4;off;SSP1;1;forcing_SSP1;SSP1;0;0;2015;/p/projects/remind/runs/r7745/output/BAU_Nash_2018-01-18_14.42.32/fulldata.gdx;SSP1-Base;REF;
diff --git a/config/old_scenario_config/scenario_config_calibrateSSPs.csv b/config/old_scenario_config/scenario_config_calibrateSSPs.csv
index a4adee391482ca3064c5b1bdfb31a8587e384a7f..5343f274dc22da7b8fd7f5ab20cf89bfcda705d5 100644
--- a/config/old_scenario_config/scenario_config_calibrateSSPs.csv
+++ b/config/old_scenario_config/scenario_config_calibrateSSPs.csv
@@ -1,4 +1,4 @@
-title;start;CES_parameters;regionmapping;capitalMarket;c_CES_calibration_new_structure;c_CES_calibration_iterations;cm_iteration_max;c_solver_try_max;cm_bioenergy_tax;climate;c_budgetCO2;cm_iterative_target_adj;optimization;transport;buildings;industry;stationary;cm_emiscen;carbonprice;cm_co2_tax_2020;cm_rcp_scen;techpol;cm_multigasscen;cm_POPscen;cm_GDPscen;cm_oil_scen;cm_gas_scen;cm_coal_scen;c_techAssumptScen;cm_nucscen;c_ccscapratescen;c_biocostscen;cm_1stgen_phaseout;cm_fetaxscen;cm_so2tax_scen;cm_OILRETIRE;cm_LU_emi_scen;c_tradecost_bio;c_SSP_forcing_adjust;c_refcapbnd;c_tau_so2_xmpt;cm_startyear;path_gdx;path_gdx_ref;path_gdx_bau;path_gdx_opt
+title;start;CES_parameters;regionmapping;capitalMarket;c_CES_calibration_new_structure;c_CES_calibration_iterations;cm_iteration_max;c_solver_try_max;cm_bioenergy_tax;climate;c_budgetCO2;cm_iterative_target_adj;optimization;transport;buildings;industry;stationary;cm_emiscen;carbonprice;cm_co2_tax_2020;cm_rcp_scen;techpol;cm_multigasscen;cm_POPscen;cm_GDPscen;cm_oil_scen;cm_gas_scen;cm_coal_scen;c_techAssumptScen;cm_nucscen;c_ccscapratescen;c_biocostscen;c_1stgen_phaseout;cm_fetaxscen;cm_so2tax_scen;cm_OILRETIRE;cm_LU_emi_scen;c_tradecost_bio;c_SSP_forcing_adjust;c_refcapbnd;c_tau_so2_xmpt;cm_startyear;path_gdx;path_gdx_ref;path_gdx_bau;path_gdx_opt
 calibrate_SSP1_bit;0;calibrate;config/regionmappingH12.csv;perfect;0;10;8;3;1.75;off;0;0;nash;complex;simple;fixed_shares;off;1;none;-1;none;none;2;pop_SSP1;gdp_SSP1;lowOil;lowGas;lowCoal;2;2;1;1;1;2;4;off;SSP1;1;forcing_SSP1;0;0;2005;/p/tmp/levesque/Remind/r_6651_SSP/output/calibrate_SSP1_postIIASA_2016-09-01_16.46.27/fulldata.gdx;;;
 calibrate_SSP2_bit;1;calibrate;config/regionmappingREMIND.csv;perfect;0;10;8;3;1;off;0;0;nash;complex;simple;fixed_shares;off;1;none;-1;none;none;2;pop_SSP2;gdp_SSP2;medOil;medGas;medCoal;1;2;1;2;0;3;1;off;SSP2;2;forcing_SSP2;0;0;2005;config/input_H12.gdx;;;
 calibrate_SSP2_bit_H12;0;calibrate;config/regionmappingH12.csv;perfect;0;10;8;3;1;off;0;0;nash;complex;simple;fixed_shares;off;1;none;-1;none;none;2;pop_SSP2;gdp_SSP2;medOil;medGas;medCoal;1;2;1;2;0;3;1;off;SSP2;2;forcing_SSP2;0;0;2005;config/input_H12.gdx;;;
diff --git a/config/old_scenario_config/scenario_config_calibrateSSPs_H12.csv b/config/old_scenario_config/scenario_config_calibrateSSPs_H12.csv
index 494e3f9421e611ee8839277a94b90125dceb6ed0..ad52fcd9d267a5b915c4ae02f04699edd5ea5ce8 100644
--- a/config/old_scenario_config/scenario_config_calibrateSSPs_H12.csv
+++ b/config/old_scenario_config/scenario_config_calibrateSSPs_H12.csv
@@ -1,4 +1,4 @@
-title;start;CES_parameters;regionmapping;capitalMarket;c_CES_calibration_new_structure;c_CES_calibration_iterations;cm_iteration_max;c_solver_try_max;cm_bioenergy_tax;climate;c_budgetCO2;cm_iterative_target_adj;optimization;transport;buildings;industry;stationary;cm_emiscen;carbonprice;cm_co2_tax_2020;cm_rcp_scen;techpol;cm_multigasscen;cm_POPscen;cm_GDPscen;cm_oil_scen;cm_gas_scen;cm_coal_scen;c_techAssumptScen;cm_nucscen;c_ccscapratescen;cm_1stgen_phaseout;cm_fetaxscen;cm_so2tax_scen;cm_OILRETIRE;cm_LU_emi_scen;c_tradecost_bio;c_SSP_forcing_adjust;c_refcapbnd;c_tau_so2_xmpt;cm_startyear;path_gdx;path_gdx_ref;path_gdx_bau;path_gdx_opt
+title;start;CES_parameters;regionmapping;capitalMarket;c_CES_calibration_new_structure;c_CES_calibration_iterations;cm_iteration_max;c_solver_try_max;cm_bioenergy_tax;climate;c_budgetCO2;cm_iterative_target_adj;optimization;transport;buildings;industry;stationary;cm_emiscen;carbonprice;cm_co2_tax_2020;cm_rcp_scen;techpol;cm_multigasscen;cm_POPscen;cm_GDPscen;cm_oil_scen;cm_gas_scen;cm_coal_scen;c_techAssumptScen;cm_nucscen;c_ccscapratescen;c_1stgen_phaseout;cm_fetaxscen;cm_so2tax_scen;cm_OILRETIRE;cm_LU_emi_scen;c_tradecost_bio;c_SSP_forcing_adjust;c_refcapbnd;c_tau_so2_xmpt;cm_startyear;path_gdx;path_gdx_ref;path_gdx_bau;path_gdx_opt
 calibrate_SSP1_bit;1;calibrate;config/regionmappingH12.csv;perfect;0;10;8;3;1.75;off;0;0;nash;complex;simple;fixed_shares;off;1;none;-1;none;none;2;pop_SSP1;gdp_SSP1;lowOil;lowGas;lowCoal;2;2;1;1;2;4;off;SSP1;1;forcing_SSP1;0;0;2005;/home/levesque/gdx/r8018_H12_SSP1.gdx;;;
 calibrate_SSP2_bit;1;calibrate;config/regionmappingH12.csv;perfect;0;10;8;3;1;off;0;0;nash;complex;simple;fixed_shares;off;1;none;-1;none;none;2;pop_SSP2;gdp_SSP2;medOil;medGas;medCoal;2;2;1;0;3;1;off;SSP2;2;forcing_SSP2;0;0;2005;/home/levesque/gdx/r8018_H12_SSP2.gdx;;;
 calibrate_SSP5_bit;1;calibrate;config/regionmappingH12.csv;perfect;0;10;8;3;1.75;off;0;0;nash;complex;simple;fixed_shares;off;1;none;-1;none;none;2;pop_SSP5;gdp_SSP5;highOil;highGas;highCoal;3;6;2;1;1;4;off;SSP5;1;forcing_SSP5;1;0.5;2005;/home/levesque/gdx/r8018_H12_SSP5.gdx;;;
diff --git a/config/oneRegi.cfg b/config/oneRegi.cfg
index 895f14e5f9ff4f30e1fe2ba0df324bee458be179..27c22cd9cfe3cbb5752d8edb9f7057d1adc74081 100644
--- a/config/oneRegi.cfg
+++ b/config/oneRegi.cfg
@@ -272,7 +272,7 @@ cfg$gms$cm_bioenergy_tax     <- 1.5     # def <- 1.5
 cfg$gms$cm_bioenergymaxscen  <- 0       # def <- 0
 cfg$gms$c_tradecost_bio      <- 2       # def <- 2
 cfg$gms$cm_LU_emi_scen       <- "SSP2"  # def <- "SSP2"
-cfg$gms$cm_1stgen_phaseout   <- 0       # def <- 0
+cfg$gms$c_1stgen_phaseout   <- 0       # def <- 0
 
 cfg$gms$cm_POPscen            <- "pop_SSP2"     # def <- "pop_SSP2"
 cfg$gms$cm_GDPscen            <- "gdp_SSP2"     # def <- "gdp_SSP2"
@@ -540,7 +540,7 @@ cfg$RunsUsingTHISgdxAsBAU <- NA
 #  (SSP1): emissions (from SSP1 scenario in MAgPIE)
 #  (SSP2): emissions (from SSP2 scenario in MAgPIE)
 #  (SSP5): emissions (from SSP5 scenario in MAgPIE)
-# cm_1stgen_phaseout "choose if 1st generation biofuels should phase out after 2030 (deltacap=0)"
+# c_1stgen_phaseout "choose if 1st generation biofuels should phase out after 2030 (deltacap=0)"
 #  (0): 1st generation biofuels after 2020 are fixed at upper limit of resource potential (maxprod)
 #  (1): no new capacities for 1st generation biofuel technologies may be built after 2030 -> phaseout until ~2060
 # cm_POPscen      "Population growth scenarios from UN data and IIASA projection used in SSP"
diff --git a/config/scenario_config_SSPSDP.csv b/config/scenario_config_SSPSDP.csv
index 1f466585b52b4c369a481124997053f5765e3606..54dedb928c35bb2f4a4ffab495f042730fdf0e6d 100644
--- a/config/scenario_config_SSPSDP.csv
+++ b/config/scenario_config_SSPSDP.csv
@@ -1,4 +1,4 @@
-title;start;regionmapping;CES_parameters;cm_bioenergy_tax;cm_rcp_scen;cm_iterative_target_adj;cm_nash_autoconverge;cm_iteration_max;c_budgetCO2;carbonprice;cm_co2_tax_2020;cm_peakBudgYr;cm_taxCO2inc_after_peakBudgYr;cm_CO2priceRegConvEndYr;cm_emiscen;cm_earlyreti_rate;cm_fetaxscen;cm_co2_tax_growth;cm_bioenergymaxscen;c_ccsinjecratescen;c_ccscapratescen;techpol;cm_POPscen;cm_GDPscen;cm_oil_scen;cm_gas_scen;cm_coal_scen;c_techAssumptScen;cm_nucscen;cm_so2tax_scen;cm_multigasscen;cm_OILRETIRE;cm_LU_emi_scen;c_tradecost_bio;cm_1stgen_phaseout;c_SSP_forcing_adjust;cm_APscen;cm_startyear;path_gdx;path_gdx_ref;path_gdx_bau
+title;start;regionmapping;CES_parameters;cm_bioenergy_tax;cm_rcp_scen;cm_iterative_target_adj;cm_nash_autoconverge;cm_iteration_max;c_budgetCO2;carbonprice;cm_co2_tax_2020;cm_peakBudgYr;cm_taxCO2inc_after_peakBudgYr;cm_CO2priceRegConvEndYr;cm_emiscen;cm_earlyreti_rate;cm_fetaxscen;cm_co2_tax_growth;cm_bioenergymaxscen;c_ccsinjecratescen;c_ccscapratescen;techpol;cm_POPscen;cm_GDPscen;cm_oil_scen;cm_gas_scen;cm_coal_scen;c_techAssumptScen;cm_nucscen;cm_so2tax_scen;cm_multigasscen;cm_OILRETIRE;cm_LU_emi_scen;c_tradecost_bio;c_1stgen_phaseout;c_SSP_forcing_adjust;cm_APscen;cm_startyear;path_gdx;path_gdx_ref;path_gdx_bau
 SSP1-calibrate;0;./config/regionmappingH12.csv;calibrate;1.75;none;0;1;1;0;none;-1;2100;3;2050;1;0.09;2;1.025;0;2;1;none;pop_SSP1;gdp_SSP1;lowOil;lowGas;lowCoal;2;2;4;2;off;SSP1;1;1;forcing_SSP1;SSP1;2005;./config/input.gdx;;
 SSP1-Base;1;./config/regionmappingH12.csv;load;1.75;none;0;1;1;0;none;-1;2100;3;2050;1;0.09;2;1.025;0;2;1;none;pop_SSP1;gdp_SSP1;lowOil;lowGas;lowCoal;2;2;4;2;off;SSP1;1;1;forcing_SSP1;SSP1;2005;./config/input.gdx;;
 SSP1-NDC;1;./config/regionmappingH12.csv;load;1.75;rcp45;3;1;1;0;NDC2018;1;2100;3;2050;9;0.09;2;1.025;0;2;1;NDC2018;pop_SSP1;gdp_SSP1;lowOil;lowGas;lowCoal;2;2;4;3;off;SSP1;1;1;forcing_SSP1;SSP1;2015;./config/input.gdx;SSP2-NDC;SSP1-Base
diff --git a/core/bounds.gms b/core/bounds.gms
index 99ce93ee6997511d38aee4dabea10899a5b6d6f0..1f37ad4a337c948b3463d33b730d9bfa5072dfd0 100755
--- a/core/bounds.gms
+++ b/core/bounds.gms
@@ -235,7 +235,7 @@ if (cm_nucscen eq 7,
 *** -------------------------------------------------------------
 *** *DK* Phaseout of 1st generation biofuel technologies
 *** -------------------------------------------------------------
-if(cm_1stgen_phaseout=1,
+if(c_1stgen_phaseout=1,
    vm_deltaCap.up(t,regi,"bioeths",rlf)$(t.val gt 2030)   = 0;
    vm_deltaCap.up(t,regi,"biodiesel",rlf)$(t.val gt 2030) = 0;
 );
diff --git a/core/datainput.gms b/core/datainput.gms
index c533b14b75c082595a5a6f9440f110eb09fca639..9cbd9afdd004272b025a40e665f31d556b71ac1f 100644
--- a/core/datainput.gms
+++ b/core/datainput.gms
@@ -332,7 +332,7 @@ $include "./core/input/p_costsPEtradeMp.cs4r"
 $offdelim
 /
 ;
-table pm_costsTradePeFinancial(all_regi,char,all_enty)        "PE tradecosts (financial costs on import, export and use)"
+table pm_costsTradePeFinancial(all_regi,char,all_enty)        "Financial costs on import, export and use of primary energy"
 $ondelim
 $include "./core/input/pm_costsTradePeFinancial.cs3r"
 $offdelim
diff --git a/core/declarations.gms b/core/declarations.gms
index c91ea44cb8c8218b27fac42d286ff6a64cb85c30..775fe5372940044d006bf7ba99ea1b789ec1ce5b 100644
--- a/core/declarations.gms
+++ b/core/declarations.gms
@@ -107,8 +107,8 @@ p_emi_quan_conv_ar4(all_enty)                               "conversion factor f
 pm_emifac(tall,all_regi,all_enty,all_enty,all_te,all_enty)  "emission factor by technology for all types of emissions in emiTe"
 pm_omeg (all_regi,opTimeYr,all_te)                          "technical depreciation parameter, gives the share of a capacity that is still usable after tlt. [none/share, value between 0 and 1]"
 p_aux_lifetime(all_regi,all_te)                             "auxiliary parameter for calculating life times, calculated externally in excel sheet"
-pm_pedem_res(ttot,all_regi,all_te)                          "demand for pebiolc residues, needed for enhancement of residue potential"
-p_ef_dem(all_enty)                                          "demand side emission factor of final energy carriers [MtCO2/EJ]"
+pm_pedem_res(ttot,all_regi,all_te)                          "Demand for pebiolc residues, needed for enhancement of residue potential [TWa]"
+p_ef_dem(all_enty)                                          "Demand side emission factor of final energy carriers [MtCO2/EJ]"
 p_bioshare(tall,all_regi,all_enty)                          "bioshare for each FE carrier"
 
 p_avCapFac2015(all_regi,all_te)                             "average capacity factor of non-bio renewables in 2015 in REMIND"
@@ -289,7 +289,7 @@ vm_capDistr(tall,all_regi,all_te,rlf)                "net capacities, distribute
 vm_capFac(ttot,all_regi,all_te)                      "capacity factor of conversion technologies"
 vm_deltaCap(tall,all_regi,all_te,rlf)                "capacity additions"
 vm_capCum(tall,all_regi,all_te)                      "gross capacities (=capacities cumulated over time)"
-vm_fuExtr(ttot,all_regi,all_enty,rlf)                "fuel use"
+vm_fuExtr(ttot,all_regi,all_enty,rlf)                "fuel use [TWa]"
 
 vm_demPe(tall,all_regi,all_enty,all_enty,all_te)     "pe demand. [TWa, Uranium: Mt Ur]"
 vm_prodPe(ttot,all_regi,all_enty)                    "pe production. [TWa, Uranium: Mt Ur]"
@@ -298,8 +298,7 @@ vm_prodSe(tall,all_regi,all_enty,all_enty,all_te)    "se production. [TWa]"
 vm_prodFe(ttot,all_regi,all_enty,all_enty,all_te)    "fe production. [TWa]"
 v_costFu(ttot,all_regi)                              "fuel costs"
 vm_costFuEx(ttot,all_regi,all_enty)                  "fuel costs from exhaustible energy [tril$US]"
-vm_pebiolc_price(ttot,all_regi)                      "bioenergy price according to MAgPIE supply curves"
-vm_pebiolc_price_shifted(ttot,all_regi)              "bioenergy price according to shifted MAgPIE supply curves, required only for calculation of the bioenergy tax"
+vm_pebiolc_price(ttot,all_regi)                      "Bioenergy price according to MAgPIE supply curves [T$US/TWa]"
 
 v_costOM(ttot,all_regi)                              "o&m costs"
 v_costInv(ttot,all_regi)                             "investment costs"
@@ -324,8 +323,8 @@ vm_demFeForEs(ttot,all_regi,all_enty,all_esty,all_teEs)     "Final energy which
 v_prodEs(ttot,all_regi,all_enty,all_esty,all_teEs)          "Energy services (unit determined by conversion factor pm_fe2es)."
 ***----------------------------------------------------------------------------------------
 ***------------------------------------------------trade module----------------------------
-vm_Xport(tall,all_regi,all_enty)                     "export of traded commodity"
-vm_Mport(tall,all_regi,all_enty)                     "import of traded commodity"
+vm_Xport(tall,all_regi,all_enty)                     "export of traded commodity [TWa]"
+vm_Mport(tall,all_regi,all_enty)                     "import of traded commodity [TWa]"
 *** Adjustment costs for Nash trade algorithm.  Only non-zero in the Nash_test realization of 80_optimization module.
 vm_costAdjNash(ttot,all_regi)                        "adjustment costs for deviation from the trade structure of the last iteration"
 ;
diff --git a/core/preloop.gms b/core/preloop.gms
index 46cdc3b868161c1d125e036bea6924adebc4f4b6..1aff0111c6e0e2077e4f2bf093ac84292cf3e466 100644
--- a/core/preloop.gms
+++ b/core/preloop.gms
@@ -67,7 +67,6 @@ vm_capDistr.l(t,regi,te,rlf)          = 0;
 vm_cap.l(t,regi,te,rlf)              = 0;
 vm_fuExtr.l(ttot,regi,"pebiolc","1")$(ttot.val ge 2005)  = 0;
 vm_pebiolc_price.l(ttot,regi)$(ttot.val ge 2005)         = 0;
-vm_pebiolc_price_shifted.l(ttot,regi)$(ttot.val ge 2005) = 0;
   
 *** overwrite default targets with gdx values if wanted
 Execute_Loadpoint 'input' p_emi_budget1_gdx = sm_budgetCO2eqGlob;
diff --git a/main.gms b/main.gms
index bc25df2d1057822cc7850cbc43478a30d885dbde..c090cde92c437c42c872ee40030f069944b786d7 100644
--- a/main.gms
+++ b/main.gms
@@ -120,7 +120,7 @@ option profile = 0;
 
 
 ***---------------------    Run name    -----------------------------------------
-$setGlobal c_expname  welfare_mod_namechange
+$setGlobal c_expname  default
 
 ***------------------------------------------------------------------------------
 ***                           MODULES
@@ -214,15 +214,15 @@ cm_CCS_chemicals     "CCS for chemicals sub-sector"
 cm_CCS_steel         "CCS for steel sub-sector"
 c_solscen             "solar option choice"
 cm_bioenergy_tax      "level of bioenergy tax in fraction of bioenergy price"
-cm_bioenergymaxscen   "bound on global pebiolc production excluding residues"
+cm_bioenergymaxscen   "choose bound on global pebiolc production excluding residues"
 c_tradecost_bio       "choose financal tradecosts for biomass (purpose grown pebiolc)"
-cm_1stgen_phaseout    "choose if 1st generation biofuels should phase out after 2020 (delatcap=0)"
-cm_cprice_red_factor "reduction factor for price on co2luc when calculating the revenues. Replicates the reduction applied in MAgPIE"
-cm_startyear          "first optimized modelling time step"
-cm_stagestart             "start of staged accession for delay runs"
-cm_stageend                       "end of staged accession for delay runs"
+c_1stgen_phaseout    "choose if 1st generation biofuels should phase out after 2030 (vm_deltaCap=0)"
+cm_cprice_red_factor  "reduction factor for price on co2luc when calculating the revenues. Replicates the reduction applied in MAgPIE"
+cm_startyear          "first optimized modelling time step [year]"
+cm_stagestart         "start of staged accession for delay runs"
+cm_stageend           "end of staged accession for delay runs"
 c_start_budget        "start of GHG budget limit"
-cm_prtpScen            "pure rate of time preference standard values"
+cm_prtpScen           "pure rate of time preference standard values"
 cm_fetaxscen          "choice of final energy tax path, subsidy path and inconvenience cost path, values other than 0 make setting module 21_tax on"
 cm_multigasscen       "scenario on GHG portfolio to be included in permit trading scheme"
 cm_permittradescen    "scenario on permit trade"
@@ -309,10 +309,10 @@ cm_CCS_steel           = 1;        !! def = 1
 
 
 cm_bioenergy_tax    = 1.5;       !! def = 1.5
-cm_bioenergymaxscen = 0;         !! def = 3
+cm_bioenergymaxscen = 0;         !! def = 0
 c_tradecost_bio     = 2;         !! def = 2
 $setglobal cm_LU_emi_scen  SSP2   !! def = SSP2
-cm_1stgen_phaseout  = 0;         !! def = 0
+c_1stgen_phaseout  = 0;         !! def = 0
 cm_cprice_red_factor  = 0.5;         !! def = 0.5
 
 $setglobal cm_POPscen  pop_SSP2  !! def = pop_SSP2
diff --git a/modules/21_tax/off/not_used.txt b/modules/21_tax/off/not_used.txt
index b46a24dce8308ac21fe815b46144e8f37fba1243..4c8fbbfb02e1c984fa2d0832f04d42d79f91a86f 100644
--- a/modules/21_tax/off/not_used.txt
+++ b/modules/21_tax/off/not_used.txt
@@ -21,7 +21,6 @@ cm_bioenergy_tax, switch, ???
 cm_startyear, switch, ???
 cm_fetaxscen, switch, ???
 cm_gdximport_target, switch, ???
-vm_pebiolc_price_shifted,variable,???
 pm_gdp_gdx,parameter,???
 pm_pop,parameter,???
 cm_so2tax_scen,switch,???
@@ -50,3 +49,4 @@ p21_implicitDiscRateMarg,input,questionnaire
 vm_emiMacSector,input,questionnaire
 cm_multigasscen,input,questionnaire
 cm_cprice_red_factor,input,questionnaire
+vm_pebiolc_price,input,questionnaire
diff --git a/modules/21_tax/on/equations.gms b/modules/21_tax/on/equations.gms
index 5baf7adc3c6de62c15f952addf8e5b322036da18..d56a841a3bde8371398336e55c542c73a082547d 100644
--- a/modules/21_tax/on/equations.gms
+++ b/modules/21_tax/on/equations.gms
@@ -163,7 +163,7 @@ v21_taxrevSO2(t,regi) =g= p21_tau_so2_tax(t,regi) * vm_emiTe(t,regi,"so2")
 *'  Documentation of overall tax approach is above at q21_taxrev.
 ***---------------------------------------------------------------------------
 q21_taxrevBio(t,regi)$(t.val ge max(2010,cm_startyear))..
-v21_taxrevBio(t,regi) =g= v21_tau_bio(t) * vm_fuExtr(t,regi,"pebiolc","1") * vm_pebiolc_price_shifted(t,regi) 
+v21_taxrevBio(t,regi) =g= v21_tau_bio(t) * vm_fuExtr(t,regi,"pebiolc","1") * vm_pebiolc_price(t,regi) 
                           - p21_taxrevBio0(t,regi);
 						  
 ***---------------------------------------------------------------------------
diff --git a/modules/21_tax/on/postsolve.gms b/modules/21_tax/on/postsolve.gms
index 6b31e9da6bdf1c8633a2c9d7dfbe0e5243d9ef82..75f2c5f720fc462f8eb59729e289c88100989ce1 100644
--- a/modules/21_tax/on/postsolve.gms
+++ b/modules/21_tax/on/postsolve.gms
@@ -39,7 +39,7 @@ p21_taxrevPE2SE0(ttot,regi) = SUM(pe2se(enty,enty2,te),
                                   ); 
 p21_taxrevXport0(ttot,regi) = SUM(tradePe(enty), p21_tau_XpRes_tax(ttot,regi,enty) * vm_Xport.l(ttot,regi,enty));
 p21_taxrevSO20(ttot,regi) = p21_tau_so2_tax(ttot,regi) * vm_emiTe.l(ttot,regi,"so2");
-p21_taxrevBio0(ttot,regi) = v21_tau_bio.l(ttot) * vm_fuExtr.l(ttot,regi,"pebiolc","1") * vm_pebiolc_price_shifted.l(ttot,regi);
+p21_taxrevBio0(ttot,regi) = v21_tau_bio.l(ttot) * vm_fuExtr.l(ttot,regi,"pebiolc","1") * vm_pebiolc_price.l(ttot,regi);
 p21_implicitDiscRate0(ttot,regi) = sum(ppfKap(in),  p21_implicitDiscRateMarg(ttot,regi,in)  * vm_cesIO.l(ttot,regi,in) );
 ***DK: for reporting only
 p21_tau_bioenergy_tax(t) = v21_tau_bio.l(t);
diff --git a/modules/21_tax/on/presolve.gms b/modules/21_tax/on/presolve.gms
index 40ec9210b3c1d8f4e5fdd8f16367cb5a2d16be79..9d3df36c77bc2a0948ec33bfb37b0f57b4035196 100644
--- a/modules/21_tax/on/presolve.gms
+++ b/modules/21_tax/on/presolve.gms
@@ -40,7 +40,7 @@ p21_taxrevPE2SE0(ttot,regi) = SUM(pe2se(enty,enty2,te),
                                   ); 
 p21_taxrevXport0(ttot,regi) = SUM(tradePe(enty), p21_tau_XpRes_tax(ttot,regi,enty) * vm_Xport.l(ttot,regi,enty));
 p21_taxrevSO20(ttot,regi) = p21_tau_so2_tax(ttot,regi) * vm_emiTe.l(ttot,regi,"so2");
-p21_taxrevBio0(ttot,regi) = v21_tau_bio.l(ttot) * vm_fuExtr.l(ttot,regi,"pebiolc","1")*vm_pebiolc_price_shifted.l(ttot,regi);
+p21_taxrevBio0(ttot,regi) = v21_tau_bio.l(ttot) * vm_fuExtr.l(ttot,regi,"pebiolc","1")*vm_pebiolc_price.l(ttot,regi);
 p21_implicitDiscRate0(ttot,regi) = sum(ppfKap(in),  p21_implicitDiscRateMarg(ttot,regi,in)  * vm_cesIO.l(ttot,regi,in) );
 
 *** EOF ./modules/21_tax/on/presolve.gms
diff --git a/modules/26_agCosts/costs/datainput.gms b/modules/26_agCosts/costs/datainput.gms
index 0ebd1cd8ddb23c428675e142379a15ccb2cf2f81..4e4d8a934949cf445ba9fe5f01f823408a887cdf 100644
--- a/modules/26_agCosts/costs/datainput.gms
+++ b/modules/26_agCosts/costs/datainput.gms
@@ -9,7 +9,10 @@
 
 pm_NXagr(tall,all_regi) = 0;
 
-*** Read total landuse cost (including bioenergy and MAC cost)
+*' **Total agricultural costs (including MAC costs)** 
+*' Total agricultural costs for REMIND standalone runs (not coupled to MAgPIE) are read from a lookup table
+*' dependent of SSP and RCP. The costs have been derived from MAgPIE runs and include bioenergy and MAC costs.
+
 parameter p26_totLUcostLookup(tall,all_regi,all_LU_emi_scen,all_rcp_scen)  "regional total landuse cost"
 /
 $ondelim
@@ -18,7 +21,7 @@ $offdelim
 /
 ;
 
-*DK* In coupled runs overwrite landuse costs from look-up table with actual MAgPIE values.
+*' In coupled runs landuse costs are directly transferred from MAgPIE run instead of reading them from the look-up table.
 $if %cm_MAgPIE_coupling% == "on"  table p26_totLUcost_coupling(tall,all_regi)  "total landuse cost from MAgPIE"
 $if %cm_MAgPIE_coupling% == "on"  $ondelim
 $if %cm_MAgPIE_coupling% == "on"  $include "./modules/26_agCosts/costs/input/p26_totLUcost_coupling.csv";
@@ -26,12 +29,17 @@ $if %cm_MAgPIE_coupling% == "on"  $offdelim
 $if %cm_MAgPIE_coupling% == "on"  ;
 
 *** Total land use costs including MAC costs (either from look-up table for standalone runs or from MAgPIE in coupled runs)
+*' @code
 $if %cm_MAgPIE_coupling% == "off" p26_totLUcosts_withMAC(ttot,regi) = p26_totLUcostLookup(ttot,regi,"%cm_LU_emi_scen%","%cm_rcp_scen%");
 $if %cm_MAgPIE_coupling% == "on"  p26_totLUcosts_withMAC(ttot,regi) = p26_totLUcost_coupling(ttot,regi);
 
-*** Land use emissions MAC cost from MAgPIE
-*** In standalone runs LU MAC costs are calcualted endogenously in REMIND AND they already included in the exogenous total landuse costs (p26_totLUcostLookup). 
-*** Therefore, substract the exact same LU MAC costs again that are already included in the exogenous total landuse costs.
+*' **Land use emissions MAC cost**
+*' In *standalone runs* land use MAC costs are calcualted endogenously in REMIND. Since they are also included 
+*' in the exogenous total landuse costs (p26_totLUcostLookup) they need to besubstracted from these total
+*' landuse costs. In coupled runs the land use MAC is deactivated in REMIND and MAC costs are included in the total land use
+*' costs that are transferred from MAgPIE.
+*' @stop
+
 parameter p26_macCostLuLookup(tall,all_regi,all_LU_emi_scen,all_rcp_scen)  "land use emissions MAC cost from MAgPIE"
 /
 $ondelim
@@ -40,8 +48,9 @@ $offdelim
 /
 ;
 
+*' @code
 *** MAC costs (either from look-up table for standalone runs or zero in coupled runs because MAgPIE's total costs already include MAC costs)
 $if %cm_MAgPIE_coupling% == "off" p26_macCostLu(ttot,regi) = p26_macCostLuLookup(ttot,regi,"%cm_LU_emi_scen%","%cm_rcp_scen%");
 $if %cm_MAgPIE_coupling% == "on"  p26_macCostLu(ttot,regi) = 0;
-
+*' @stop 
 *** EOF ./modules/26_agCosts/costs/datainput.gms
diff --git a/modules/26_agCosts/costs/declarations.gms b/modules/26_agCosts/costs/declarations.gms
index 87087de225e1db9a554c5ddffe30c0318f1e1e50..b369e44ad652f0e5fc30beff29ed443299de9c38 100644
--- a/modules/26_agCosts/costs/declarations.gms
+++ b/modules/26_agCosts/costs/declarations.gms
@@ -6,10 +6,10 @@
 *** |  Contact: remind@pik-potsdam.de
 *** SOF ./modules/26_agCosts/costs/declarations.gms
 parameter
-pm_totLUcosts(tall,all_regi)           "total landuse costs (agriculture, bioenergy, MAC, etc), in standalone runs MAC costs are substituted by costs from teh REMIND-MAC"
-p26_totLUcosts_withMAC(tall,all_regi)  "total landuse costs including MAC (agriculture, bioenergy, MAC, etc)"
-p26_macCostLu(tall,all_regi)           "Land use emissions MAC cost"
-pm_NXagr(tall,all_regi)                "net agricultural exports"
+pm_totLUcosts(tall,all_regi)           "Total landuse costs (agriculture, bioenergy, MAC, etc). In standalone runs MAC costs are substituted by costs from the endogenous REMIND-MAC [T$US]"
+p26_totLUcosts_withMAC(tall,all_regi)  "Total landuse costs including agricultural MAC costs (agriculture, bioenergy, MAC, etc) [T$US]"
+p26_macCostLu(tall,all_regi)           "Land use emissions MAC cost [T$US]"
+pm_NXagr(tall,all_regi)                "Net agricultural exports"
 ;
 
 *** EOF ./modules/26_agCosts/costs/declarations.gms
diff --git a/modules/26_agCosts/costs/presolve.gms b/modules/26_agCosts/costs/presolve.gms
index 8526573b8442946b0317637fc7b90ade9f3b5e1d..3575bdf3cac4b9c60db4387e86bb7d6b1cfe04ee 100644
--- a/modules/26_agCosts/costs/presolve.gms
+++ b/modules/26_agCosts/costs/presolve.gms
@@ -5,7 +5,18 @@
 *** |  REMIND License Exception, version 1.0 (see LICENSE file).
 *** |  Contact: remind@pik-potsdam.de
 
-*** Substitude MAC LU costs for stand alone runs by data from REMIND-MAC-LU
-*** in coupled runs the two last components are zero and the original data from MAgPIE are used
-*** For standalone runs dont include mac costs for CO2luc, because they are already implicitly included in p26_totLUcosts_withMAC (and not in p26_macCostLu)
+*' @code
+*' **Total agricultural costs (excluding MAC costs)**
+*' For standalone runs replace exogenous land use MAC cots (p26_macCostLu) with endogenous land use MAC costs (pm_macCost). 
+*' Note: dont include mac costs for CO2luc, because they are already implicitly included in p26_totLUcosts_withMAC (and not in p26_macCostLu).
+*' In coupled runs these two components are zero and the original data from MAgPIE are used.
 pm_totLUcosts(ttot,regi) =  p26_totLUcosts_withMAC(ttot,regi) - p26_macCostLu(ttot,regi) + sum(enty$(emiMacMagpie(enty) AND (NOT emiMacMagpieCO2(enty))), pm_macCost(ttot,regi,enty));
+
+*' **Bioenergy costs**
+*' For standalone and coupled runs costs for biomass production are calculated endogenously (v30_pebiolc_costs). Since they
+*' are also included in the exogenous total landuse costs (p26_totLUcostLookup) they need to be substracted from these total
+*' landuse costs. This is done in the biomass module ([30_biomass]) by calculating them before the main solve as a
+*' parameter (p30_pebiolc_costs_emu_preloop), and during the optimization substracting this parameter from the fuel costs
+*' while including the variable v30_pebiolc_costs.
+
+*' @stop
\ No newline at end of file
diff --git a/modules/26_agCosts/costs/realization.gms b/modules/26_agCosts/costs/realization.gms
index bc82f7257055664459831abe46bb932934a3cfeb..9d05a375466f38428831741e75bd5b212aff0b10 100644
--- a/modules/26_agCosts/costs/realization.gms
+++ b/modules/26_agCosts/costs/realization.gms
@@ -6,6 +6,12 @@
 *** |  Contact: remind@pik-potsdam.de
 *** SOF ./modules/26_agCosts/costs.gms
 
+*' @description
+*' Agricultural production costs in REMIND consist of the following components: actual production costs 
+*' (land conversion, crop cultivation, irrigation, technological change, ...), bioenergy costs, cost for abating
+*' emissions accruing from agricultural activity (marginal abatement costs = MAC cost). 
+
+
 *####################### R SECTION START (PHASES) ##############################
 $Ifi "%phase%" == "declarations" $include "./modules/26_agCosts/costs/declarations.gms"
 $Ifi "%phase%" == "datainput" $include "./modules/26_agCosts/costs/datainput.gms"
diff --git a/modules/26_agCosts/module.gms b/modules/26_agCosts/module.gms
index ff01c031bf5f562e119bcf38e14cd00edfbc9719..434ad537ae91cc41930e033ebe163e8154e965f3 100644
--- a/modules/26_agCosts/module.gms
+++ b/modules/26_agCosts/module.gms
@@ -6,6 +6,12 @@
 *** |  Contact: remind@pik-potsdam.de
 *** SOF ./modules/26_agCosts/26_agCosts.gms
 
+*' @title Agricultural costs
+*'
+*' @description This module calculates the costs for agricultural production which is exogenous to REMIND.
+*'
+*' @authors Franziska Piontek, David Klein
+
 *###################### R SECTION START (MODULETYPES) ##########################
 $Ifi "%agCosts%" == "costs" $include "./modules/26_agCosts/costs/realization.gms"
 $Ifi "%agCosts%" == "costs_trade" $include "./modules/26_agCosts/costs_trade/realization.gms"
diff --git a/modules/30_biomass/exogenous/not_used.txt b/modules/30_biomass/exogenous/not_used.txt
index 0ee6b31289d93a9cd9dfc66b8cef96216ae0784e..f87fe85e940c5f8a320d5d61e5ad78e6a0ee7034 100644
--- a/modules/30_biomass/exogenous/not_used.txt
+++ b/modules/30_biomass/exogenous/not_used.txt
@@ -10,9 +10,7 @@ sm_GJ_2_TWa, scalar, ???
 pm_pedem_res, parameter, ???
 vm_pebiolc_price, variable, ??
 vm_Xport, variable, ??
-cm_1stgen_phaseout, switch, ???
 cm_startyear, switch, ???
-vm_pebiolc_price_shifted,variable,???
 pm_costsTradePeFinancial,parameter,???
 sm_eps,scalar,???
 sm_EJ_2_TWa,input,questionnaire
diff --git a/modules/30_biomass/magpie_40/bounds.gms b/modules/30_biomass/magpie_40/bounds.gms
index 7e7a977ca9b09f009c981651a427fe4886fe9133..6cb6344c2643989654940bf52b340572d0546f8a 100644
--- a/modules/30_biomass/magpie_40/bounds.gms
+++ b/modules/30_biomass/magpie_40/bounds.gms
@@ -19,18 +19,13 @@
 *** Bounds on 1st generation biomass annual production
 *** -------------------------------------------------------------
 
-*** Prescribe upper limit for first generation biomass from 2030 on only, so REMIND has freedom before
-*** To avoid infeasibilities it was necessary to modify the initial vintage structure for bioeths
+*** Prescribe upper and lower limit for first generation biomass from 2030/45 on, so REMIND has freedom before.
+*** To avoid infeasibilities it was necessary to modify the initial vintage structure for bioeths.
 vm_fuExtr.up(t,regi,"pebios","5")$(t.val ge 2045)  = p30_datapebio(regi,"pebios","5","maxprod",t);
 vm_fuExtr.up(t,regi,"pebioil","5")$(t.val ge 2030) = p30_datapebio(regi,"pebioil","5","maxprod",t);
 
-if(cm_1stgen_phaseout=0,
-    vm_fuExtr.lo(t,regi,"pebios","5")$(t.val ge 2030)  = p30_datapebio(regi,"pebios","5","maxprod",t)*0.9;
-    vm_fuExtr.lo(t,regi,"pebioil","5")$(t.val ge 2030) = p30_datapebio(regi,"pebioil","5","maxprod",t)*0.9;
-else
-    vm_fuExtr.lo(t,regi,"pebios","5")$(t.val eq 2030)  = p30_datapebio(regi,"pebios","5","maxprod",t)*0.9;
-    vm_fuExtr.lo(t,regi,"pebioil","5")$(t.val eq 2030) = p30_datapebio(regi,"pebioil","5","maxprod",t)*0.9;
-);
+vm_fuExtr.lo(t,regi,"pebios","5")$(t.val ge 2030)  = p30_datapebio(regi,"pebios","5","maxprod",t)*0.9;
+vm_fuExtr.lo(t,regi,"pebioil","5")$(t.val ge 2030) = p30_datapebio(regi,"pebioil","5","maxprod",t)*0.9;
 
 *** -------------------------------------------------------------
 *** Bounds on 2nd generation biomass annual production
diff --git a/modules/30_biomass/magpie_40/datainput.gms b/modules/30_biomass/magpie_40/datainput.gms
index 750425a483dd996f4bd756702cf7164d86787dfb..3634928c6b9e33d0fa42b88ea5a613e5a8fd92e6 100644
--- a/modules/30_biomass/magpie_40/datainput.gms
+++ b/modules/30_biomass/magpie_40/datainput.gms
@@ -21,7 +21,7 @@ $offdelim
 ;
 
 *** costs: use global costs for all regions ($/GJ -> T$/TWa)
-*** define costs for pebiolc residues (defined only for 2nd grade) 
+*** define costs for pebiolc residues (2nd grade) 
 *** and for pebios, pebioil (defined only for 5th grade)
 p30_datapebio(regi,"pebios","5","cost",ttot)$(ttot.val ge 2005)  = 12.4 * s30_D2TD / sm_GJ_2_TWa;
 p30_datapebio(regi,"pebioil","5","cost",ttot)$(ttot.val ge 2005) = 15.8 * s30_D2TD / sm_GJ_2_TWa;
diff --git a/modules/30_biomass/magpie_40/declarations.gms b/modules/30_biomass/magpie_40/declarations.gms
index 1784e83a2695d3da7049a0cfc336b411f80e0a97..0720058718a4d6fe33f6c53271875d407ba22edd 100644
--- a/modules/30_biomass/magpie_40/declarations.gms
+++ b/modules/30_biomass/magpie_40/declarations.gms
@@ -7,61 +7,56 @@
 *** SOF ./modules/30_biomass/magpie_4/declarations.gms
 
 scalars
-s30_D2TD                "multiplicative factor to convert from Dollar to TeraDollar"     /1.0e-12/
-s30_max_pebiolc         "absolute end value of bound on global pebiolc production in EJ/a"
-s30_switch_shiftcalc    "activates equation for shift calculation before main solve and deactivates it during main solve" /0/
+s30_D2TD                "Multiplicative factor to convert from Dollar to TeraDollar"     /1.0e-12/
+s30_max_pebiolc         "Absolute end value of bound on global pebiolc production [TWa]"
+s30_switch_shiftcalc    "Switch to activate equation for shift calculation before main solve and to deactivate it during main solve" /0/
 ;
 
 parameter
-p30_datapebio(all_regi,all_enty,rlf,charPeRe,ttot) "global bioenergy potential for residues and 1st generation crops"
-p30_max_pebiolc_path(all_regi,tall)             "time path of maximal pebiolc production containing absolute values for 200 EJ case"
-p30_max_pebiolc_path_glob(tall)                 "time path of maximal pebiolc production containing absolute values for 200 EJ case"
-p30_max200_path(tall)                           "time path of maximal pebiolc production containing absolute values for 200 EJ case"
-p30_maxprod_residue(ttot,all_regi)              "enhanced (by demand of biotr) potential of residues"
-p30_min_pebiolc(ttot,all_regi)                  "additional lower bounds to avoid very steep beginning of some supply curves"
-p30_pebiolc_pricemag(tall,all_regi)             "prices and costs for 2nd gen. purpose grown bioenergy from MAgPIE"
-p30_pebiolc_demandmag(tall,all_regi)            "production of 2nd gen. purpose grown bioenergy from MAgPIE"
+p30_datapebio(all_regi,all_enty,rlf,charPeRe,ttot) "Global bioenergy potential for lignocellulosic residues and 1st generation crops [TWa]"
+p30_max_pebiolc_path(all_regi,tall)             "Time path of regional maximal pebiolc production [TWa]"
+p30_max_pebiolc_path_glob(tall)                 "Time path of global maximal pebiolc production [TWa]"
+p30_max200_path(tall)                           "Time path of global maximal pebiolc production containing values for 200 EJ case [TWa]"
+p30_maxprod_residue(ttot,all_regi)              "Maximal potential of residues enhanced by demand of biotr [TWa]"
+p30_pebiolc_pricemag(tall,all_regi)             "Prices for lignocellulosic purpose grown bioenergy from MAgPIE [T$US/TWa]"
+p30_pebiolc_demandmag(tall,all_regi)            "Production of lignocellulosic purpose grown bioenergy from MAgPIE [TWa]"
 
 *** Shift factor calculation
-p30_pebiolc_costs_emu_preloop(ttot,all_regi)    "bioenergy costs calculated with emulator using MAgPIE demand for shift factor calculation"
-p30_pebiolc_price_emu_preloop(ttot,all_regi)    "bioenergy price calculated with emulator using MAgPIE demand for shift factor calculation"
-p30_pebiolc_price_emu_preloop_shifted(ttot,all_regi) "bioenergy price calculated with emulator using MAgPIE demand after shift factor calculation"
-p30_pebiolc_pricshift(ttot,all_regi)            "regional translation factor that shifts emulator prices to better fit actual MAgPIE prices"
-p30_pebiolc_pricmult(ttot,all_regi)             "regional multiplication factor that sclaes emulator prices to better fit actual MAgPIE prices"
+p30_pebiolc_costs_emu_preloop(ttot,all_regi)    "Bioenergy costs calculated with emulator using MAgPIE demand. For shift factor calculation [T$US]"
+p30_pebiolc_price_emu_preloop(ttot,all_regi)    "Bioenergy price calculated with emulator using MAgPIE demand. For shift factor calculation [T$US/TWa]"
+p30_pebiolc_price_emu_preloop_shifted(ttot,all_regi) "Bioenergy price calculated with emulator using MAgPIE demand after shift factor calculation [T$US/TWa]"
+p30_pebiolc_pricshift(ttot,all_regi)            "Regional translation factor that shifts emulator prices to better fit actual MAgPIE prices [-]"
+p30_pebiolc_pricmult(ttot,all_regi)             "Regional multiplication factor that sclaes emulator prices to better fit actual MAgPIE prices [-]"
 
 *** Parameters for regression of MAgPIE prices and costs ("MAgPIE emulator")
 
 *** Parameters used in the equation are chosen from above according to year and climate target
-i30_bioen_price_a(ttot,all_regi)              "time dependent intercept in bioenergy price formula"
-i30_bioen_price_b(ttot,all_regi)              "time dependent slope in bioenergy price formula"
+i30_bioen_price_a(ttot,all_regi)   "Time dependent intercept in bioenergy price formula [T$US/TWa]"
+i30_bioen_price_b(ttot,all_regi)   "Time dependent slope in bioenergy price formula [T$US/TWa/TWa]"
 
 *** Parameters used for the determination of regional biomass bounds consistent with global bound based on same marginal supply costs
-p30_pebiolc_price_dummy                         "dummy for the bio-energy price to match it with the bioenergy bound s30_max_pebiolc"
-p30_max_pebiolc_dummy                           "dummy for bio energy supply at p30_pebiolc_price_dummy"
-p30_fuelex_dummy(all_regi)                      "dummy for bio-energy supply per region"
+p30_pebiolc_price_dummy            "Dummy for the bio-energy price to match the bioenergy bound s30_max_pebiolc"
+p30_max_pebiolc_dummy              "Dummy for bio energy supply at p30_pebiolc_price_dummy"
+p30_fuelex_dummy(all_regi)         "Dummy for bio-energy supply per region"
 ;
 
-
 variables
-v30_pebiolc_costs(ttot,all_regi)                         "bioenergy costs according to MAgPIE supply curves"
-v30_shift_r2                                             "least square to minimize during shift calculation"
+v30_pebiolc_costs(ttot,all_regi)   "Bioenergy costs according to MAgPIE supply curves [T$US]"
+v30_shift_r2                       "Least square to minimize during shift calculation"
 ;
 
-
 Positive variable
-v30_priceshift(ttot,all_regi)      "regional shift factor for bioenergy prices"
-v30_pricemult(ttot,all_regi)       "regional slope factor for bioenergy prices"
-v30_multcost(ttot,all_regi)        "cost markup factor for deviations from demand of last coupling iteration"
+v30_priceshift(ttot,all_regi)      "Regional translation factor that shifts emulator prices to better fit actual MAgPIE prices [-]"
+v30_pricemult(ttot,all_regi)       "Regional multiplication factor that sclaes emulator prices to better fit actual MAgPIE prices [-]"
+v30_multcost(ttot,all_regi)        "Cost markup factor for deviations from demand of last coupling iteration [-]"
 ;
 
-
 equations
-q30_costFuBio(ttot,all_regi)             "total costs of bioenergy production"
-q30_pebiolc_price(ttot,all_regi)         "MAgPIE emulator: calculates the price of pebiolc according to MAgPIE supply curves"
-q30_pebiolc_price_base(ttot,all_regi)    "MAgPIE emulator: calculates the price of pebiolc according to MAgPIE supply curves"
-q30_pebiolc_costs(ttot,all_regi)         "MAgPIE emulator: calculates the costs of pebiolc according to MAgPIE supply curves"
-q30_priceshift                           "calculates shift factor by minimizing least squares of price differences between MAgPIE output and MAgPIE emulator"
-q30_limitXpBio(ttot,all_regi)            "only purpose grown bioenergy may be exported, no residues"
-q30_costAdj(ttot,all_regi)               "improve convergence penalizing deviations from last coupling iteration"
+q30_costFuBio(ttot,all_regi)       "Total costs of bioenergy production"
+q30_pebiolc_price(ttot,all_regi)   "MAgPIE emulator: calculates the price of pebiolc according to MAgPIE supply curves"
+q30_pebiolc_costs(ttot,all_regi)   "MAgPIE emulator: calculates the costs of pebiolc according to MAgPIE supply curves"
+q30_priceshift                     "Calculates shift factor by minimizing least squares of price differences between MAgPIE output and MAgPIE emulator"
+q30_limitXpBio(ttot,all_regi)      "Only purpose grown bioenergy may be exported, no residues"
+q30_costAdj(ttot,all_regi)         "Improve convergence penalizing deviations from last coupling iteration"
 ;
 *** EOF ./modules/30_biomass/magpie_4/declarations.gms
diff --git a/modules/30_biomass/magpie_40/equations.gms b/modules/30_biomass/magpie_40/equations.gms
index e0463af61d00ee9031263f5e0b439bc8dc8cd6ec..7cb1f7a06449f18ff4f3cf6631c58c922a192cb5 100644
--- a/modules/30_biomass/magpie_40/equations.gms
+++ b/modules/30_biomass/magpie_40/equations.gms
@@ -13,10 +13,11 @@
 *' 
 *' **Total fuel costs for biomass**  
 *' The first part, summing over *peren2rlf30*, represents costs for biomass with fixed prices.
-*' The second part that includes *v30_pebiolc_costs* represents costs for biomass with continous supply curves from MAgPIE.
-*' In coupled runs *v30_multcost* is a cost markup factor improving the optimization performance by penalizing
-*' (too) large jumps in the demand in between two coupling iterations. It converges to 1 and therefore does not affect the outcome.
-*' The last part, containing *pm_costsTradePeFinancial*, represents additional tradecosts (only for purpose grown lignocellulosic biomass).
+*' The second part that includes *v30_pebiolc_costs* represents costs for biomass with continous 
+*' supply curves from MAgPIE. In coupled runs *v30_multcost* is a cost markup factor improving 
+*' the convergence by penalizing large jumps in the demand between two coupling 
+*' iterations. It converges to 1 and therefore does not affect the outcome. The last part, containing 
+*' *pm_costsTradePeFinancial*, represents additional tradecosts (only for purpose grown lignocellulosic biomass).
 
 q30_costFuBio(ttot,regi)$(ttot.val ge cm_startyear).. 
          vm_costFuBio(ttot,regi)
@@ -28,21 +29,14 @@ $if %cm_MAgPIE_coupling% == "off" (v30_pebiolc_costs(ttot,regi))
          + 
          sum(peren2cont30(enty,rlf), vm_fuExtr(ttot,regi,enty,rlf) * pm_costsTradePeFinancial(regi,"use",enty));
 
-*' **Calculate cost markup factor for coupled runs**  
-*' It penalizes large jumps from the previous coupling iteration and converges to 1, as the difference between *vm_fuExtr* and 
-*' *p30_pebiolc_demandmag* vanish when the coupling converges over iterations.
-q30_costAdj(ttot,regi)$(ttot.val ge cm_startyear)..
-         v30_multcost(ttot,regi)
-         =e=
-         power((vm_fuExtr(ttot,regi,"pebiolc","1")-p30_pebiolc_demandmag(ttot,regi))/ (p30_pebiolc_demandmag(ttot,regi) + 0.15),2) * 0.4 + 1
-;
-
 ***---------------------------------------------------------------------------
 ***                      MAgPIE EMULATOR
 ***---------------------------------------------------------------------------
 
-*' **Caclulate bioenergy price according to MAgPIE supply curves**  
-*' The equation is mainly used by shift factor calculation in the preloop. In main solve it is only required for bioenergy tax.
+*' **MAgPIE EMULATOR: PRICE**  
+*' This equation calculates the price for purpose grown lignocellulosic biomass as a (linear) function of demand according to the supplycurve as it was derived
+*' from MAgPIE. The equation is used by the shift factor calculation in the preloop stage. In the main solve stage the price is only 
+*' used to apply the bioenergy tax. It contains optional shift and scaling of supply curves in coupled runs. 
 
 q30_pebiolc_price(ttot,regi)$(ttot.val ge cm_startyear)..
          vm_pebiolc_price(ttot,regi)
@@ -50,20 +44,11 @@ q30_pebiolc_price(ttot,regi)$(ttot.val ge cm_startyear)..
          (v30_priceshift(ttot,regi) 
        + i30_bioen_price_a(ttot,regi) 
        + i30_bioen_price_b(ttot,regi) * (vm_fuExtr(ttot,regi,"pebiolc","1") + sm_eps) )
-       * v30_pricemult(ttot,regi);
-
-*' **Calculate bioenergy price according to shifted MAgPIE supply curves**  
-*' Required only to calculate the bioenergy tax. For historic reasons there exist both *vm_pebiolc_price_shifted* and 
-*' *vm_pebiolc_price*. Could be refactored some time.
-
-q30_pebiolc_price_base(ttot,regi)$(ttot.val ge cm_startyear)..
-         vm_pebiolc_price_shifted(ttot,regi)
-         =e=
-         vm_pebiolc_price(ttot,regi)
+       * v30_pricemult(ttot,regi)
 ;
 
-*' **MAgPIE EMULATOR**  
-*' Calculates bioenergy costs of purpose grown lignocellulosic biomass by integrating the linear price supply curve.
+*' **MAgPIE EMULATOR: COST**  
+*' Calculates bioenergy costs of purpose grown lignocellulosic biomass by integrating the linear price supply curve (see above).
 *' It contains optional shift and scaling of supply curves in coupled runs. 
 *' The equation is used both in preloop and main solve.
 
@@ -75,7 +60,6 @@ q30_pebiolc_costs(ttot,regi)$(ttot.val ge cm_startyear)..
        + i30_bioen_price_b(ttot,regi) / 2 * (vm_fuExtr(ttot,regi,"pebiolc","1") + sm_eps) )
        * v30_pricemult(ttot,regi)
        * vm_fuExtr(ttot,regi,"pebiolc","1")
-       
 ;
 
 ***---------------------------------------------------------------------------
@@ -83,17 +67,34 @@ q30_pebiolc_costs(ttot,regi)$(ttot.val ge cm_startyear)..
 ***---------------------------------------------------------------------------
 
 *' **Calculate shift factor for bioenergy costs**  
-*' The factor is computed by minimizing least squares (*v30_shift_r2*) of cost differences between MAgPIE output and MAgPIE emulator.
+*' This applies in coupled runs only to shift the supplycurve according to the price response of MAgPIE. The factor is computed 
+*' by minimizing least squares (*v30_shift_r2*) of price differences between actual MAgPIE output (from coupled runs) and the 
+*' supply curve (aka MAgPIE emulator). 
 *' It is solved in presolve (*s30_switch_shiftcalc* = 1) and deactivated in main solve (*s30_switch_shiftcalc* = 0).
 *' *pm_ts* is used as a weight factor, representing the time step length.
 
 q30_priceshift$(s30_switch_shiftcalc eq 1)..
          v30_shift_r2
          =e=
-         sum(regi,
-             sum(ttot$(ttot.val ge 2005 AND p30_pebiolc_pricemag(ttot,regi) gt 0), power((p30_pebiolc_pricemag(ttot,regi) - vm_pebiolc_price(ttot,regi))*pm_ts(ttot),2)
-             )
-         )
+         sum(regi, sum(ttot$(ttot.val ge 2005 AND p30_pebiolc_pricemag(ttot,regi) gt 0), power((p30_pebiolc_pricemag(ttot,regi) - vm_pebiolc_price(ttot,regi))*pm_ts(ttot),2)))
+;
+
+***---------------------------------------------------------------------------
+***                      COUPLING CONVERGENCE
+***---------------------------------------------------------------------------
+
+*' **Calculate cost markup factor for coupled runs**  
+*' Improve convergence of the REMIND-MAgPIE coupling by penalizing deviations from last coupling iteration. 
+*' This applies in coupled runs only to prevent large jumps in bioenergy demand between coupling iterations. 
+*' It penalizes deviations in the demand for purpose grown bioenergy from the previous coupling iteration 
+*' by increasing the costs proportional to the deviation. The factor converges to 1, as the 
+*' difference between *vm_fuExtr* and *p30_pebiolc_demandmag* vanishes when the coupling converges over 
+*' iterations.
+
+q30_costAdj(ttot,regi)$(ttot.val ge cm_startyear)..
+         v30_multcost(ttot,regi)
+         =e=
+         power((vm_fuExtr(ttot,regi,"pebiolc","1")-p30_pebiolc_demandmag(ttot,regi))/ (p30_pebiolc_demandmag(ttot,regi) + 0.15),2) * 0.4 + 1
 ;
 
 ***---------------------------------------------------------------------------
diff --git a/modules/30_biomass/magpie_40/preloop.gms b/modules/30_biomass/magpie_40/preloop.gms
index ed365c66c26da0a943a9c82f4e6f402337d2e6c3..3ad13625fa3db342d6475a071eeb7519b72a8b6a 100644
--- a/modules/30_biomass/magpie_40/preloop.gms
+++ b/modules/30_biomass/magpie_40/preloop.gms
@@ -7,14 +7,15 @@
 *** SOF ./modules/30_biomass/magpie_4/preloop.gms
 
 ***=============================================================
-***  BEGIN: calculate shift factors for bioenergy prices that 
-***  shift supply curves according to the comparison of results
-***  from MAgPIE and the emulators. Steps:
+***  BEGIN: calculate shift factors for bioenergy prices 
+***  Compare price response from MAgPIE run with emulator prices
+***  and shift emulator supply curves to match the MAgPIE price.
+***  Steps:
 ***  1  Fix fuelex to MAgPIE demand
 ***  2a Calculate bioenergy prices with emulator based on MAgPIE demand
-***  2b Compare this with original MAgPIE prices and calculate price shift factor
-***  3 Calculate costs
-***  4  Release the bound on fuelex (to be precise: fuelex has to be fixed only for 2a and 3a)  
+***  2b Calculate price shift factor by comparing 2a with original MAgPIE prices
+***  3  Calculate costs based on MAgPIE demand
+***  4  Release the bound on fuelex (to be precise: fuelex has to be fixed only for 2a and 3)  
 ***  Note: In the cost formula in 3a the price shift factor is used!
 
 *** Eliminate effect of shift and mult for calculating the original emulator price
@@ -77,13 +78,11 @@ $endif
 ***------------ Step 3: calculate bioenergy costs -------------
 *** The costs are calculated applying the regular cost equation. 
 *** This equation integrates the shifted (!) price supply curve over the demand.
-*** Since the price shift factor is required for this it has been calcualted before (see above).
-*** There is no cost shift factor (anymore) since there is no cost emulator (anymore), 
-*** because the costs are calculated by integrating the shifted price supply curve.
+*** It requires the price shift factor to be calcualted before (see above).
 
 solve model_biopresolve_c using cns; !!! nothing has to be optimized here, just pure calculation
 
-p30_pebiolc_costs_emu_preloop(ttot,regi) = v30_pebiolc_costs.l(ttot,regi); !!! save for reporting
+p30_pebiolc_costs_emu_preloop(ttot,regi) = v30_pebiolc_costs.l(ttot,regi);
 
 display p30_pebiolc_costs_emu_preloop;
 
diff --git a/modules/30_biomass/magpie_40/realization.gms b/modules/30_biomass/magpie_40/realization.gms
index 5404c5b4cd8ac008f273d242bef01dc5ecd02a0d..67b8c489d50dc4e781a6483853975394aea3dd5b 100644
--- a/modules/30_biomass/magpie_40/realization.gms
+++ b/modules/30_biomass/magpie_40/realization.gms
@@ -7,7 +7,7 @@
 *** SOF ./modules/30_biomass/magpie_linear.gms
 
 *' @description
-*' Calculation of biomass costs. The costs for purpose grown ligno-cellulosic biomass 
+*' The costs for purpose grown ligno-cellulosic biomass 
 *' are the integral under the supplycurve. The supplycurves have been derived from MAgPIE 4.1
 
 *####################### R SECTION START (PHASES) ##############################
diff --git a/scripts/output/single/gdx_example.R b/scripts/output/single/gdx_example.R
deleted file mode 100644
index 3ed79024d3bf4f9362b9ad7c6e4cd5e54bf35769..0000000000000000000000000000000000000000
--- a/scripts/output/single/gdx_example.R
+++ /dev/null
@@ -1,114 +0,0 @@
-# |  (C) 2006-2019 Potsdam Institute for Climate Impact Research (PIK)
-# |  authors, and contributors see CITATION.cff file. This file is part
-# |  of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of
-# |  AGPL-3.0, you are granted additional permissions described in the
-# |  REMIND License Exception, version 1.0 (see LICENSE file).
-# |  Contact: remind@pik-potsdam.de
-
-library(lusweave)
-library(luplot)
-library(lucode)
-library(gdx)
-
-############################# BASIC CONFIGURATION #############################
-gdx_name <- "fulldata.gdx"        # name of the gdx   
-
-if(!exists("source_include")) {
-  #Define arguments that can be read from command line
-   outputdir <- "."               # path to the output folder
-   readArgs("outputdir","gdx_name")
-} 
-
-###############################################################################
-
-##################### general plot settings ###################################
-# time horizon for plots
-y_plot <- c("y2005","y2010","y2015","y2020","y2025","y2030","y2035","y2040","y2045","y2050","y2055","y2060","y2070","y2080","y2090","y2100")
-# regions for the plots
-r_plot <- c("ROW","EUR","CHN","IND","JPN","RUS","USA","OAS","MEA","LAM","AFR")
-###############################################################################
-
-# Set gdx path
-gdx_path <- path(outputdir,gdx_name)
-
-############### Consumption ############################################
-cons <- readGDX(gdx_path,"vm_cons", format="first_found")
-p1 <- magpie2ggplot2(cons[r_plot,y_plot,"l"],geom='line',ylab='Consumption[trill.$US]',color='Region',show_grid=TRUE)
-p2 <- magpie2ggplot2(cons[r_plot,y_plot,"l"],geom='line',facet_x=NULL,ylab='Consumption[trill.$US]',color='Region',show_grid=TRUE)
-########################################################################
-
-### vari - used for GDP,...
-vari <- readGDX(gdx_path,"vm_cesIO", format="first_found")
-
-############### GDP|MER ################################################   
-gdp <- vari[,,"inco.l"]
-p3 <- magpie2ggplot2(gdp[r_plot,y_plot,],geom='line',ylab='GDP[trill.$US]',color='Region',show_grid=TRUE)
-p4 <- magpie2ggplot2(gdp[r_plot,y_plot,],geom='area',stack=TRUE,facet_x=NULL,ylab='GDP',color='Region',show_grid=TRUE)
-########################################################################
-
-### fuelex - used for pebiolc
-fuelex <- readGDX(gdx_path,"vm_fuExtr", format="first_found")
-
-############### biomass extraction #####################################
-fuelex_bio <- fuelex[,,"pebiolc.1.l"]
-fuelex_bio <- setNames(fuelex_bio,"level")
-  # upper bound on biomass
-fuelex_up <- readGDX(gdx_path,"p30_max_pebiolc_path", format="first_found")
-fuelex_up <- setNames(fuelex_up,"up")
-  # lower bound on biomass
-fuelex_lo <- readGDX(gdx_path,"p30_min_pebiolc", format="first_found")
-fuelex_lo <- setNames(fuelex_lo,"lo")
-  # put all together for plotting
-plot_fuelex_bio <- mbind2(fuelex_up[r_plot,y_plot,"up"],fuelex_bio[r_plot,y_plot,],fuelex_lo[r_plot,y_plot,"lo"])
-p5 <- magpie2ggplot2(plot_fuelex_bio,geom='line',group=NULL,color='Data1',ylab='biomass extraction',scales='free_y',show_grid=TRUE)
-########################################################################
-
-############### quality of intertemporal convergence (defic) ###########
-defic <- readGDX(gdx_path,"p80_defic", format="first_found") 
-n_plot <- c()
-for (n in getNames(defic)) {
- if(defic[,,n]!=0) n_plot = c(n_plot,n)
-}
-p6 <- magpie2ggplot2(defic[r_plot,,n_plot],geom='line',xaxis='Data1',xlab='iteration',ylab='defic',color='Region',facet_x=NULL,show_grid=TRUE)
-########################################################################
-
-### budget - used for price scaling,...
-budget <- readGDX(gdx_path,"qm_budget", format="first_found")
-
-############### prices of resources ####################################   
-budget_m <- budget[,,"m"]
-pebal <- readGDX(gdx_path,"q_balPe", format="first_found")
-pebal_m <- as.magpie(pebal[,,"m"])
-res_plot <- c("peoil","pegas","pecoal","peur","pebiolc")
-pebal_m <- pebal_m[,,res_plot]
-prices <- pebal_m/budget_m 
-p7 <- magpie2ggplot2(prices[r_plot,y_plot,],geom='line',ylab='prices[trill.$US/TWa]',facet_x='Data1',color='Region',scales='free_y',show_grid=TRUE)
-########################################################################
-
-############### print figures ##########################################
-print(p1)
-print(p2)
-print(p3)
-print(p4)
-print(p5)
-print(p6)
-print(p7)
-########################################################################
-
-############### write pdf of the plots #################################
-library(lusweave)
-
-sw <- swopen("gdx_example.pdf")
-swfigure(sw,print,p1)
-swfigure(sw,print,p2)
-swfigure(sw,print,p3)
-swfigure(sw,print,p4)
-swfigure(sw,print,p5)
-swfigure(sw,print,p6)
-swfigure(sw,print,p7)
-swclose(sw)
-########################################################################
- 
-  
-  
-
diff --git a/scripts/start_functions.R b/scripts/start_functions.R
index cd065c31fa9bd3910850e13ca7acf8e88c30c725..18d7ef7c40cb650d7ae0f7d1787fbe6ec4692b46 100644
--- a/scripts/start_functions.R
+++ b/scripts/start_functions.R
@@ -97,7 +97,7 @@ start_run <- function(cfg, scenario = NULL, report = NULL, sceninreport = NULL,
 
   # Make sure all MAGICC files have LF line endings, so Fortran won't crash
   if (on_cluster)
-    system("find ./core/magicc/ -type f -not -name \"magicc6\" | xargs dos2unix -q")
+    system("find ./core/magicc/ -type f | xargs dos2unix -q")
   
   # Create output folder
   if (!file.exists(cfg$results_folder)) {
diff --git a/standalone/MOFEX/MOFEX.gms b/standalone/MOFEX/MOFEX.gms
index c48d847fe3a9ba8c37cfb717df7def5e515fe8ec..39ce0d2211a7494e5e79c2777623df1af097b1ae 100644
--- a/standalone/MOFEX/MOFEX.gms
+++ b/standalone/MOFEX/MOFEX.gms
@@ -133,7 +133,7 @@ c_solscen             "solar option choice"
 cm_bioenergy_tax      "level of bioenergy tax in fraction of bioenergy price"
 cm_bioenergymaxscen   "bound on global pebiolc production excluding residues"
 c_tradecost_bio       "choose financal tradecosts for biomass (purpose grown pebiolc)"
-cm_1stgen_phaseout    "choose if 1st generation biofuels should phase out after 2020 (delatcap=0)"
+c_1stgen_phaseout    "choose if 1st generation biofuels should phase out after 2030 (vm_deltaCap=0)"
 cm_startyear          "first optimized modelling time step"
 cm_stagestart             "start of staged accession for delay runs"
 cm_stageend                       "end of staged accession for delay runs"
@@ -220,10 +220,10 @@ cm_CCS_steel           = 1;        !! def = 1
 
 
 cm_bioenergy_tax    = 1.5;       !! def = 1.5
-cm_bioenergymaxscen = 0;         !! def = 3
+cm_bioenergymaxscen = 0;         !! def = 0
 c_tradecost_bio     = 2;         !! def = 2
 $setglobal cm_LU_emi_scen  SSP2   !! def = SSP2
-cm_1stgen_phaseout  = 0;         !! def = 0
+c_1stgen_phaseout  = 0;         !! def = 0
 
 $setglobal cm_POPscen  pop_SSP2  !! def = pop_SSP2
 $setglobal cm_GDPscen  gdp_SSP2  !! def = gdp_SSP2
diff --git a/standalone/template.gms b/standalone/template.gms
index 5fa0fc6dc0273840c6b9e7f51aa1756e1c913f06..1931912f8db3c03019c633a98678b3663ad01662 100644
--- a/standalone/template.gms
+++ b/standalone/template.gms
@@ -141,7 +141,7 @@ c_solscen             "solar option choice"
 cm_bioenergy_tax      "level of bioenergy tax in fraction of bioenergy price"
 cm_bioenergymaxscen   "bound on global pebiolc production excluding residues"
 c_tradecost_bio       "choose financal tradecosts for biomass (purpose grown pebiolc)"
-cm_1stgen_phaseout    "choose if 1st generation biofuels should phase out after 2020 (delatcap=0)"
+c_1stgen_phaseout    "choose if 1st generation biofuels should phase out after 2030 (vm_deltaCap=0)"
 cm_startyear          "first optimized modelling time step"
 cm_stagestart             "start of staged accession for delay runs"
 cm_stageend                       "end of staged accession for delay runs"
@@ -228,10 +228,10 @@ cm_CCS_steel           = 1;        !! def = 1
 
 
 cm_bioenergy_tax    = 1.5;       !! def = 1.5
-cm_bioenergymaxscen = 0;         !! def = 3
+cm_bioenergymaxscen = 0;         !! def = 0
 c_tradecost_bio     = 2;         !! def = 2
 $setglobal cm_LU_emi_scen  SSP2   !! def = SSP2
-cm_1stgen_phaseout  = 0;         !! def = 0
+c_1stgen_phaseout  = 0;         !! def = 0
 
 $setglobal cm_POPscen  pop_SSP2  !! def = pop_SSP2
 $setglobal cm_GDPscen  gdp_SSP2  !! def = gdp_SSP2