Index: src/GenPoly/ErasableScopedMap.h
===================================================================
--- src/GenPoly/ErasableScopedMap.h	(revision 24d6572fc571b2a894d56a9335edd57899c448c0)
+++ src/GenPoly/ErasableScopedMap.h	(revision 9b0c193665908871eccf91544fefe7ce1698b7e4)
@@ -57,6 +57,5 @@
 	/// Starts a new scope
 	void beginScope() {
-		Scope scope;
-		scopes.push_back(scope);
+		scopes.emplace_back();
 	}
 
@@ -145,7 +144,6 @@
 		public std::iterator< std::bidirectional_iterator_tag, value_type > {
 	friend class ErasableScopedMap;
-	typedef typename std::map< Key, Value >::iterator wrapped_iterator;
-	typedef typename std::vector< std::map< Key, Value > > scope_list;
-	typedef typename scope_list::size_type size_type;
+	typedef typename Scope::iterator wrapped_iterator;
+	typedef typename ScopeList::size_type size_type;
 
 	/// Checks if this iterator points to a valid item
Index: src/GenPoly/ScopedSet.h
===================================================================
--- src/GenPoly/ScopedSet.h	(revision 24d6572fc571b2a894d56a9335edd57899c448c0)
+++ src/GenPoly/ScopedSet.h	(revision 9b0c193665908871eccf91544fefe7ce1698b7e4)
@@ -47,6 +47,5 @@
 	/// Starts a new scope
 	void beginScope() {
-		Scope scope;
-		scopes.push_back(scope);
+		scopes.emplace_back();
 	}
 
@@ -85,5 +84,5 @@
 	iterator findNext( const_iterator &it, const Value &key ) {
 		if ( it.i == 0 ) return end();
-			for ( size_type i = it.i - 1; ; --i ) {
+		for ( size_type i = it.i - 1; ; --i ) {
 			typename Scope::iterator val = scopes[i].find( key );
 			if ( val != scopes[i].end() ) return iterator( scopes, val, i );
@@ -112,7 +111,6 @@
 	friend class ScopedSet;
 	friend class const_iterator;
-	typedef typename std::set< Value >::iterator wrapped_iterator;
-	typedef typename std::vector< std::set< Value > > scope_list;
-	typedef typename scope_list::size_type size_type;
+	typedef typename Scope::iterator wrapped_iterator;
+	typedef typename ScopeList::size_type size_type;
 
 	/// Checks if this iterator points to a valid item
@@ -133,5 +131,5 @@
 	}
 
-	iterator(scope_list const &_scopes, const wrapped_iterator &_it, size_type _i)
+	iterator(ScopeList const &_scopes, const wrapped_iterator &_it, size_type _i)
 		: scopes(&_scopes), it(_it), i(_i) {}
 public:
@@ -176,5 +174,5 @@
 
 private:
-	scope_list const *scopes;
+	ScopeList const *scopes;
 	wrapped_iterator it;
 	size_type i;
@@ -185,8 +183,7 @@
 		public std::iterator< std::bidirectional_iterator_tag, value_type > {
 	friend class ScopedSet;
-	typedef typename std::set< Value >::iterator wrapped_iterator;
-	typedef typename std::set< Value >::const_iterator wrapped_const_iterator;
-	typedef typename std::vector< std::set< Value > > scope_list;
-	typedef typename scope_list::size_type size_type;
+	typedef typename Scope::iterator wrapped_iterator;
+	typedef typename Scope::const_iterator wrapped_const_iterator;
+	typedef typename ScopeList::size_type size_type;
 
 	/// Checks if this iterator points to a valid item
@@ -207,5 +204,5 @@
 	}
 
-	const_iterator(scope_list const &_scopes, const wrapped_const_iterator &_it, size_type _i)
+	const_iterator(ScopeList const &_scopes, const wrapped_const_iterator &_it, size_type _i)
 		: scopes(&_scopes), it(_it), i(_i) {}
 public:
@@ -255,5 +252,5 @@
 
 private:
-	scope_list const *scopes;
+	ScopeList const *scopes;
 	wrapped_const_iterator it;
 	size_type i;
