diff --git a/Configuration.cpp b/Configuration.cpp
index d523a06fd748573e8ba6371b8c45ecb6e3909c36..c1f1a4381a0eec9bf8e0aafab750c24c49da7551 100644
--- a/Configuration.cpp
+++ b/Configuration.cpp
@@ -408,6 +408,9 @@ void Configuration::copyToCUDA() {
 	// TODO: The above line fails when there is not enough memory. If it fails, stop.
 	
 	// TODO: what's going on here?
+	// pmf_h is made as a copy of *part[i].pmf, which is then asynchronously copied to Device, and
+	// is not deleted
+	// seems like bad code, but not 100% sure
 	for (int i = 0; i < numParts; i++) {
 		BaseGrid *pmf = NULL, *diffusionGrid = NULL;
 		BrownianParticleType *b = new BrownianParticleType(part[i]);
diff --git a/RigidBodyType.cpp b/RigidBodyType.cpp
index 2dec83a64019a69385681c564f5fe2af620f89f5..90581e64566f3cfee72352a775927b33f86d4eac 100644
--- a/RigidBodyType.cpp
+++ b/RigidBodyType.cpp
@@ -52,8 +52,30 @@ KeyGrid RigidBodyType::createKeyGrid(String s) {
 	return g;
 }
 void RigidBodyType::addPotentialGrid(String s) {
-	potentialGrids.push_back( createKeyGrid(s) );
+	// tokenize and return
+	int numTokens = s.tokenCount();
+	if (numTokens != 2) {
+		printf("ERROR: could not add Grid.\n"); // TODO improve this message
+		exit(1);
+	}
+	String* token = new String[numTokens];
+	s.tokenize(token);
+	String key = token[0];
+	BaseGrid g(token[1]);
+	
+	potentialGrids.push_back( g );
 }
 void RigidBodyType::addDensityGrid(String s) {
-	densityGrids.push_back( createKeyGrid(s) );
+	// tokenize and return
+	int numTokens = s.tokenCount();
+	if (numTokens != 2) {
+		printf("ERROR: could not add Grid.\n"); // TODO improve this message
+		exit(1);
+	}
+	String* token = new String[numTokens];
+	s.tokenize(token);
+	String key = token[0];
+	BaseGrid g(token[1]);
+	
+	densityGrids.push_back( g );
 }
diff --git a/RigidBodyType.h b/RigidBodyType.h
index 571ae8aa5a84268671c77138ab0e57cb7edaa1f2..645422c8a73ac26fc12039b854f46b281b9234b8 100644
--- a/RigidBodyType.h
+++ b/RigidBodyType.h
@@ -9,41 +9,47 @@
 #include "useful.h"
 #include "BaseGrid.h"
 
-// Stores particle type's potential grid and other information
-struct KeyGrid {
-	String key;
-	BaseGrid grid;
-KeyGrid() :
-	key(NULL), grid() { }	
-};
-
 class RigidBodyType {
 private:
 	// Deletes all members
 	void clear();
 	// void copy(const RigidBodyType& src);
 
-	KeyGrid createKeyGrid(String s);
-
 public:
+/* RigidBodyType(const String& name = "") : */
+/* 	name(name), num(0), */
+/* 		reservoir(NULL), mass(1.0f), inertia(), transDamping(), */
+/* 		rotDamping(), potentialGrids(NULL), densityGrids(NULL), */
+/* 		potentialGrids_D(NULL), densityGrids_D(NULL) { } */
+
 RigidBodyType(const String& name = "") :
 	name(name), num(0),
 		reservoir(NULL), mass(1.0f), inertia(), transDamping(),
-		rotDamping(), potentialGrids(NULL), densityGrids(NULL),
-		potentialGrids_D(NULL), densityGrids_D(NULL) { }
+		rotDamping() {
+		/* potentialGrids = 	*(new thrust::host_vector<BaseGrid>()); */
+		/* densityGrids = 	*(new thrust::host_vector<BaseGrid>()); */
+		/* potentialGrids = 	*(new thrust::host_vector<BaseGrid>()); */
+		/* densityGrids = 	*(new thrust::host_vector<BaseGrid>()); */
+
+		/* thrust::host_vector<BaseGrid> potentialGrids; */
+		/* thrust::host_vector<BaseGrid> densityGrids; */
+		/* thrust::device_vector<BaseGrid> potentialGrids_D; */
+		/* thrust::device_vector<BaseGrid> densityGrids_D; */
+
+		potentialGrids = thrust::host_vector<BaseGrid>();
+		densityGrids	 = thrust::host_vector<BaseGrid>();
+		potentialGrids = thrust::host_vector<BaseGrid>();
+		densityGrids	 = thrust::host_vector<BaseGrid>();
+
+	}
+
+
 	
 	/* RigidBodyType(const RigidBodyType& src) { copy(src); } */
 	~RigidBodyType() { clear(); }
 
 	/* RigidBodyType& operator=(const RigidBodyType& src); */
 
-	// crop
-	// Crops all BaseGrid members
-	// @param  boundries to crop to (x0, y0, z0) -> (x1, y1, z1);
-	//         whether to change the origin
-	// @return success of function (if false nothing was done)
-	/* bool crop(int x0, int y0, int z0, int x1, int y1, int z1, bool keep_origin); */
-
   void addPotentialGrid(String s);
 	void addDensityGrid(String s);
 	
@@ -52,17 +58,14 @@ public:
 	int num; // number of particles of this type
 
 	Reservoir* reservoir;
-	/* BaseGrid* pmf; */
 
 	float mass;
 	Vector3 inertia;
 	Vector3 transDamping;
 	Vector3 rotDamping;
 
-	/* std::vector<KeyGrid> potentialGrids; */
-	/* std::vector<KeyGrid> densityGrids; */
-	thrust::host_vector<KeyGrid> potentialGrids;
-	thrust::device_vector<KeyGrid> potentialGrids_D;
-	thrust::host_vector<KeyGrid> densityGrids;
-	thrust::device_vector<KeyGrid> densityGrids_D;
+	thrust::host_vector<BaseGrid> potentialGrids;
+	thrust::host_vector<BaseGrid> densityGrids;
+	thrust::device_vector<BaseGrid> potentialGrids_D;
+	thrust::device_vector<BaseGrid> densityGrids_D;
 };