Index: src/Concurrency/Actors.cpp
===================================================================
--- src/Concurrency/Actors.cpp	(revision 96ddc629ac15699df3b7f35ada756efea94d903f)
+++ src/Concurrency/Actors.cpp	(revision a8e8c679fcf2fe80dcd5836b55b5688ff240d812)
@@ -36,9 +36,12 @@
     StructDecl * parentDecl;
     bool insideStruct = false;
-
+    bool namedDecl = false;
+
+    // finds and sets a ptr to the Allocation enum, which is needed in the next pass
     void previsit( const EnumDecl * decl ) {
         if( decl->name == "Allocation" ) *allocationDecl = decl;
     }
 
+    // finds and sets a ptr to the actor, message, and request structs, which are needed in the next pass
     void previsit( const StructDecl * decl ) {
         GuardValue(insideStruct);
@@ -47,11 +50,23 @@
         if( decl->name == "actor" ) *actorDecl = decl;
         if( decl->name == "message" ) *msgDecl = decl;
-        if( decl->name == "request" ) *requestDecl = decl;        
+        if( decl->name == "request" ) *requestDecl = decl;
 	}
 
+    // this catches structs of the form:
+    //     struct dummy_actor { actor a; };
+    // since they should be:
+    //     struct dummy_actor { inline actor; };
+    void previsit ( const ObjectDecl * decl ) {
+        if ( insideStruct && ! decl->name.empty() ) {
+            GuardValue(namedDecl);
+            namedDecl = true;
+        }
+    }
+
+    // this collects the valid actor and message struct decl pts
     void postvisit( const StructInstType * node ) {
         if ( ! *actorDecl || ! *msgDecl ) return;
-        if ( insideStruct ) {
-            if ( node->aggr() == *actorDecl ) { // C_TODO: see if we need to check for empty name
+        if ( insideStruct && !namedDecl ) {
+            if ( node->aggr() == *actorDecl ) {
                 actorStructDecls.insert( parentDecl );
             } else if ( node->aggr() == *msgDecl ) {
@@ -100,5 +115,5 @@
             iter->second.emplace( make_pair( otherDecl, data ) );
         } else { // else create inner map for key
-            map.emplace( make_pair( decl, unordered_map<const StructDecl *, FwdDeclData *>( { make_pair( otherDecl, data ) } ) ) ); // C_TODO: maybe emplace?
+            map.emplace( make_pair( decl, unordered_map<const StructDecl *, FwdDeclData *>( { make_pair( otherDecl, data ) } ) ) );
         }
     }
@@ -118,48 +133,30 @@
         unordered_map<const StructDecl *, unordered_map<const StructDecl *, FwdDeclData *>> & otherMap =  isMsg ? actorMap : msgMap;
         auto iter = map.find( decl );
-
         list<FunctionDecl *> toInsertAfter; // this is populated with decls that are ready to insert
         if ( iter == map.end() ) return toInsertAfter;
         
+        // iterate over inner map
         unordered_map<const StructDecl *, FwdDeclData *> & currInnerMap = iter->second;
-
-        cout << "a" << endl;
-        // iterate over inner map
         for ( auto innerIter = currInnerMap.begin(); innerIter != currInnerMap.end(); ) {
-            cout << "b: " << decl->name << endl;
             FwdDeclData * currentDatum = innerIter->second;
-            printf("P: %p\n", currentDatum->fwdDecl );
-
             bool readyToInsert = isMsg ? currentDatum->foundMsg() : currentDatum->foundActor();
             if ( ! readyToInsert ) { ++innerIter; continue; }
             
-            cout << "c" << endl;
             // readyToInsert is true so we are good to insert the forward decl of the message fn
             toInsertAfter.push_back( currentDatum->fwdDecl );
 
-            cout << "d" << endl;
-
+            // need to remove from other map before deleting
+            // find inner map in other map ( other map is actor map if original is msg map and vice versa )
             const StructDecl * otherDecl = isMsg ? currentDatum->actorDecl : currentDatum->msgDecl;
-
-            // need to remove from other map before deleting
-            // find inner map of FwdDeclData in other map ( other map is actor map if original is msg map and vice versa )
             auto otherMapIter = otherMap.find( otherDecl );
 
             unordered_map<const StructDecl *, FwdDeclData *> & otherInnerMap = otherMapIter->second;
 
-            cout << "e" << endl;
             // find the FwdDeclData we need to remove in the other inner map
             auto otherInnerIter = otherInnerMap.find( decl );
 
-            cout << "f" << endl;
-            // now we are safe to delete the FwdDeclData since we are done with it
-            // have to delete before we invalidate the iterator
-            delete currentDatum; // C_TODO: move down since this no longer iterator dependant
-
-            cout << "g" << endl;
             // remove references to deleted FwdDeclData from current inner map
             innerIter = currInnerMap.erase( innerIter ); // this does the increment so no explicit inc needed
 
-            cout << "h" << endl;
             // remove references to deleted FwdDeclData from other inner map
             otherInnerMap.erase( otherInnerIter );
@@ -168,4 +165,8 @@
             if ( otherInnerMap.empty() )
                 otherMap.erase( otherDecl );
+
+            // now we are safe to delete the FwdDeclData since we are done with it
+            // and we have removed all references to it from our data structures
+            delete currentDatum;
         }
 
