diff --git a/app/models/collections/public_context.rb b/app/models/collections/public_context.rb
index 67c73e55796cbad0e87aaba39624b65281aa51f8..ba6b51acab6499e387e277d8b0a245e282baaadd 100644
--- a/app/models/collections/public_context.rb
+++ b/app/models/collections/public_context.rb
@@ -1,14 +1,16 @@
 ##
 # This class represents an specification for listing collections
 # The PublicContext class specify all collections with field privacy=public
-class Collections::PublicContext < Context
+module Collections
+  class PublicContext < Context
 
-  def from
-    'Collection'
-  end
+    def from
+      'Collection'
+    end
 
-  def privacy
-    'public'
-  end
+    def privacy
+      'public'
+    end
 
+  end
 end
\ No newline at end of file
diff --git a/app/models/collections/user_context.rb b/app/models/collections/user_context.rb
index 13dbf50e65d87747d7db0607ec6e817ff3609c23..23cfe8f02e3eb4361c44bf814f9742c999454a30 100644
--- a/app/models/collections/user_context.rb
+++ b/app/models/collections/user_context.rb
@@ -1,11 +1,13 @@
-class UserContext < Context
+module Collections
+  class UserContext < Context
 
-  def initialize(user)
-    @user = user
-  end
+    def initialize(user)
+      @user = user
+    end
 
-  def from
-    sprintf "select expand(in('BelongsTo')) from %s)", @user.rid
-  end
+    def from
+      sprintf "select expand(in('BelongsTo')) from %s)", @user.rid
+    end
 
+  end
 end
\ No newline at end of file
diff --git a/app/models/collections/user_private_context.rb b/app/models/collections/user_private_context.rb
index 970528cee50df3bf07ac45796ee534cfe7f017aa..96e7772c1f964a0140a79d9024f08f0d33d79fb1 100644
--- a/app/models/collections/user_private_context.rb
+++ b/app/models/collections/user_private_context.rb
@@ -1,10 +1,12 @@
 ##
 # This class represents an specification for listing collections
 # The PublicContext class specify all collections with field privacy=public
-class Collections::UserPrivateContext < UserContext
+module Collections
+  class UserPrivateContext < UserContext
 
-  def privacy
-    'private'
-  end
+    def privacy
+      'private'
+    end
 
+  end
 end
\ No newline at end of file
diff --git a/app/models/collections/user_public_context.rb b/app/models/collections/user_public_context.rb
index ff40143951b3f25285471474a8691d4e10fa7e78..1c5b02014753887eaa6c68f042102028765a0475 100644
--- a/app/models/collections/user_public_context.rb
+++ b/app/models/collections/user_public_context.rb
@@ -1,10 +1,12 @@
 ##
 # This class represents an specification for listing collections
 # The PublicContext class specify all collections with field privacy=public
-class Collections::UserPublicContext < UserContext
+module Collections
+  class UserPublicContext < UserContext
 
-  def privacy
-    'public'
-  end
+    def privacy
+      'public'
+    end
 
+  end
 end
\ No newline at end of file