diff --git a/OpenRA.Mods.D2k/AutoCarryall/CarryUnit.cs b/OpenRA.Mods.D2k/Activities/CarryUnit.cs
similarity index 98%
rename from OpenRA.Mods.D2k/AutoCarryall/CarryUnit.cs
rename to OpenRA.Mods.D2k/Activities/CarryUnit.cs
index f01193aa85..0cc099616b 100644
--- a/OpenRA.Mods.D2k/AutoCarryall/CarryUnit.cs
+++ b/OpenRA.Mods.D2k/Activities/CarryUnit.cs
@@ -11,12 +11,13 @@ using System;
using System.Drawing;
using System.Linq;
using OpenRA.Activities;
+using OpenRA.Mods.D2k.Traits;
using OpenRA.Mods.RA;
using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.D2k
+namespace OpenRA.Mods.D2k.Activities
{
public class CarryUnit : Activity
{
diff --git a/OpenRA.Mods.D2k/SwallowActor.cs b/OpenRA.Mods.D2k/Activities/SwallowActor.cs
similarity index 98%
rename from OpenRA.Mods.D2k/SwallowActor.cs
rename to OpenRA.Mods.D2k/Activities/SwallowActor.cs
index 5d6d8c05cd..e9491a27bd 100644
--- a/OpenRA.Mods.D2k/SwallowActor.cs
+++ b/OpenRA.Mods.D2k/Activities/SwallowActor.cs
@@ -14,10 +14,11 @@ using OpenRA.Activities;
using OpenRA.GameRules;
using OpenRA.Mods.Common;
using OpenRA.Mods.Common.Traits;
+using OpenRA.Mods.D2k.Traits;
using OpenRA.Mods.RA.Move;
using OpenRA.Traits;
-namespace OpenRA.Mods.D2k
+namespace OpenRA.Mods.D2k.Activities
{
enum AttackState { Burrowed, EmergingAboveGround, ReturningUnderground }
diff --git a/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj b/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj
index 8889a12c7d..714ab3766e 100644
--- a/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj
+++ b/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj
@@ -68,32 +68,32 @@
-
-
+
+
+
+
+
-
+
+
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
diff --git a/OpenRA.Mods.D2k/AttackSwallow.cs b/OpenRA.Mods.D2k/Traits/AttackSwallow.cs
similarity index 95%
rename from OpenRA.Mods.D2k/AttackSwallow.cs
rename to OpenRA.Mods.D2k/Traits/AttackSwallow.cs
index 0732f0fa9a..3293cae7d5 100644
--- a/OpenRA.Mods.D2k/AttackSwallow.cs
+++ b/OpenRA.Mods.D2k/Traits/AttackSwallow.cs
@@ -8,10 +8,11 @@
*/
#endregion
+using OpenRA.Mods.D2k.Activities;
using OpenRA.Mods.RA;
using OpenRA.Traits;
-namespace OpenRA.Mods.D2k
+namespace OpenRA.Mods.D2k.Traits
{
[Desc("Sandworms use this attack model.")]
class AttackSwallowInfo : AttackFrontalInfo
diff --git a/OpenRA.Mods.D2k/AutoCarryall/AutoCarryall.cs b/OpenRA.Mods.D2k/Traits/AutoCarryall.cs
similarity index 98%
rename from OpenRA.Mods.D2k/AutoCarryall/AutoCarryall.cs
rename to OpenRA.Mods.D2k/Traits/AutoCarryall.cs
index 6d47e5d8b4..42c931daa6 100644
--- a/OpenRA.Mods.D2k/AutoCarryall/AutoCarryall.cs
+++ b/OpenRA.Mods.D2k/Traits/AutoCarryall.cs
@@ -12,12 +12,13 @@ using System.Collections.Generic;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
+using OpenRA.Mods.D2k.Activities;
using OpenRA.Mods.RA;
using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.D2k
+namespace OpenRA.Mods.D2k.Traits
{
[Desc("Automatically transports harvesters with the Carryable trait between resource fields and refineries")]
public class AutoCarryallInfo : ITraitInfo, Requires
diff --git a/OpenRA.Mods.D2k/AutoCarryall/Carryable.cs b/OpenRA.Mods.D2k/Traits/Carryable.cs
similarity index 98%
rename from OpenRA.Mods.D2k/AutoCarryall/Carryable.cs
rename to OpenRA.Mods.D2k/Traits/Carryable.cs
index 46ed0cb9bf..85c555f853 100644
--- a/OpenRA.Mods.D2k/AutoCarryall/Carryable.cs
+++ b/OpenRA.Mods.D2k/Traits/Carryable.cs
@@ -12,9 +12,10 @@ using System.Linq;
using OpenRA.Activities;
using OpenRA.Mods.Common;
using OpenRA.Mods.Common.Traits;
+using OpenRA.Mods.D2k.Activities;
using OpenRA.Traits;
-namespace OpenRA.Mods.D2k
+namespace OpenRA.Mods.D2k.Traits
{
[Desc("Can be carried by units with the trait `AutoCarryall`.")]
public class CarryableInfo : ITraitInfo
diff --git a/OpenRA.Mods.D2k/TemporaryOwnerManager.cs b/OpenRA.Mods.D2k/Traits/TemporaryOwnerManager.cs
similarity index 98%
rename from OpenRA.Mods.D2k/TemporaryOwnerManager.cs
rename to OpenRA.Mods.D2k/Traits/TemporaryOwnerManager.cs
index 725f21ca73..91475bc633 100644
--- a/OpenRA.Mods.D2k/TemporaryOwnerManager.cs
+++ b/OpenRA.Mods.D2k/Traits/TemporaryOwnerManager.cs
@@ -11,7 +11,7 @@
using System.Drawing;
using OpenRA.Traits;
-namespace OpenRA.Mods.D2k
+namespace OpenRA.Mods.D2k.Traits
{
[Desc("Interacts with the ChangeOwner warhead.",
"Displays a bar how long this actor is affected and reverts back to the old owner on temporary changes.")]
diff --git a/OpenRA.Mods.D2k/WormManager.cs b/OpenRA.Mods.D2k/Traits/World/WormManager.cs
similarity index 99%
rename from OpenRA.Mods.D2k/WormManager.cs
rename to OpenRA.Mods.D2k/Traits/World/WormManager.cs
index deb74aca5c..40ba93871c 100644
--- a/OpenRA.Mods.D2k/WormManager.cs
+++ b/OpenRA.Mods.D2k/Traits/World/WormManager.cs
@@ -16,7 +16,7 @@ using OpenRA.Mods.Common.Traits;
using OpenRA.Primitives;
using OpenRA.Traits;
-namespace OpenRA.Mods.D2k
+namespace OpenRA.Mods.D2k.Traits
{
[Desc("Controls the spawning of sandworms. Attach this to the world actor.")]
class WormManagerInfo : ITraitInfo
diff --git a/OpenRA.Mods.D2k/ChangeOwnerWarhead.cs b/OpenRA.Mods.D2k/Warheads/ChangeOwnerWarhead.cs
similarity index 95%
rename from OpenRA.Mods.D2k/ChangeOwnerWarhead.cs
rename to OpenRA.Mods.D2k/Warheads/ChangeOwnerWarhead.cs
index b17fea5f5c..3be8ed3fef 100644
--- a/OpenRA.Mods.D2k/ChangeOwnerWarhead.cs
+++ b/OpenRA.Mods.D2k/Warheads/ChangeOwnerWarhead.cs
@@ -10,9 +10,10 @@
using System.Collections.Generic;
using OpenRA.GameRules;
+using OpenRA.Mods.D2k.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.D2k
+namespace OpenRA.Mods.D2k.Warheads
{
[Desc("Interacts with the DynamicOwnerChange trait.")]
public class ChangeOwnerWarhead : Warhead
diff --git a/OpenRA.Mods.RA/Activities/LayMines.cs b/OpenRA.Mods.RA/Activities/LayMines.cs
index 431321a9af..a50eb6072f 100644
--- a/OpenRA.Mods.RA/Activities/LayMines.cs
+++ b/OpenRA.Mods.RA/Activities/LayMines.cs
@@ -10,6 +10,7 @@
using System.Linq;
using OpenRA.Activities;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Primitives;
using OpenRA.Traits;
diff --git a/OpenRA.Mods.RA/Effects/TeslaZap.cs b/OpenRA.Mods.RA/Effects/TeslaZap.cs
index 21ac24398a..9c01f42b4b 100644
--- a/OpenRA.Mods.RA/Effects/TeslaZap.cs
+++ b/OpenRA.Mods.RA/Effects/TeslaZap.cs
@@ -12,6 +12,7 @@ using System.Collections.Generic;
using OpenRA.Effects;
using OpenRA.GameRules;
using OpenRA.Graphics;
+using OpenRA.Mods.RA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Effects
diff --git a/OpenRA.Mods.RA/TeslaZapRenderable.cs b/OpenRA.Mods.RA/Graphics/TeslaZapRenderable.cs
old mode 100755
new mode 100644
similarity index 99%
rename from OpenRA.Mods.RA/TeslaZapRenderable.cs
rename to OpenRA.Mods.RA/Graphics/TeslaZapRenderable.cs
index b3ac8bf6bf..bf38515a97
--- a/OpenRA.Mods.RA/TeslaZapRenderable.cs
+++ b/OpenRA.Mods.RA/Graphics/TeslaZapRenderable.cs
@@ -13,7 +13,7 @@ using System.Collections.Generic;
using System.Linq;
using OpenRA.Graphics;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Graphics
{
struct TeslaZapRenderable : IRenderable
{
diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj
index 7f7435aebe..a3e68e5b97 100644
--- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj
+++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj
@@ -97,7 +97,7 @@
-
+
@@ -133,7 +133,7 @@
-
+
@@ -199,8 +199,8 @@
-
-
+
+
@@ -252,7 +252,7 @@
-
+
diff --git a/OpenRA.Mods.RA/AcceptsSupplies.cs b/OpenRA.Mods.RA/Traits/AcceptsSupplies.cs
similarity index 94%
rename from OpenRA.Mods.RA/AcceptsSupplies.cs
rename to OpenRA.Mods.RA/Traits/AcceptsSupplies.cs
index 0a0d04c1eb..d682fbe30b 100644
--- a/OpenRA.Mods.RA/AcceptsSupplies.cs
+++ b/OpenRA.Mods.RA/Traits/AcceptsSupplies.cs
@@ -10,7 +10,7 @@
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Tag trait for SupplyTruck: actors.")]
class AcceptsSuppliesInfo : TraitInfo {}
diff --git a/OpenRA.Mods.RA/Mine.cs b/OpenRA.Mods.RA/Traits/Mine.cs
similarity index 97%
rename from OpenRA.Mods.RA/Mine.cs
rename to OpenRA.Mods.RA/Traits/Mine.cs
index 49cc093dac..e49203f1d1 100644
--- a/OpenRA.Mods.RA/Mine.cs
+++ b/OpenRA.Mods.RA/Traits/Mine.cs
@@ -12,7 +12,7 @@ using System.Linq;
using OpenRA.Mods.RA.Move;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
class MineInfo : ITraitInfo, IOccupySpaceInfo
{
diff --git a/OpenRA.Mods.RA/Minelayer.cs b/OpenRA.Mods.RA/Traits/Minelayer.cs
similarity index 99%
rename from OpenRA.Mods.RA/Minelayer.cs
rename to OpenRA.Mods.RA/Traits/Minelayer.cs
index 3bec38b2c7..525d6e51ba 100644
--- a/OpenRA.Mods.RA/Minelayer.cs
+++ b/OpenRA.Mods.RA/Traits/Minelayer.cs
@@ -11,12 +11,12 @@
using System;
using System.Linq;
using System.Collections.Generic;
-using OpenRA.Traits;
using OpenRA.Graphics;
-using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.Common.Orders;
+using OpenRA.Mods.RA.Activities;
+using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
class MinelayerInfo : ITraitInfo
{
diff --git a/OpenRA.Mods.RA/SupplyTruck.cs b/OpenRA.Mods.RA/Traits/SupplyTruck.cs
similarity index 98%
rename from OpenRA.Mods.RA/SupplyTruck.cs
rename to OpenRA.Mods.RA/Traits/SupplyTruck.cs
index e9bbccadce..5f77dd156e 100644
--- a/OpenRA.Mods.RA/SupplyTruck.cs
+++ b/OpenRA.Mods.RA/Traits/SupplyTruck.cs
@@ -14,7 +14,7 @@ using OpenRA.Mods.Common.Orders;
using OpenRA.Mods.RA.Activities;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Donate money to building if it has the AcceptSupplies: trait.")]
class SupplyTruckInfo : ITraitInfo