Index: src/Common/ScopedMap.h
===================================================================
--- src/Common/ScopedMap.h	(revision b2ecd4801c2bbbcda494bff1458244b61abd1662)
+++ src/Common/ScopedMap.h	(revision 4c2e561f46e37c956d59cd5054091612c978e9cd)
@@ -199,7 +199,6 @@
 	friend class ScopedMap;
 	friend class const_iterator;
-	typedef typename ScopedMap::MapType::iterator wrapped_iterator;
-	typedef typename ScopedMap::ScopeList scope_list;
-	typedef typename scope_list::size_type size_type;
+	typedef typename MapType::iterator wrapped_iterator;
+	typedef typename ScopeList::size_type size_type;
 
 	/// Checks if this iterator points to a valid item
@@ -220,5 +219,5 @@
 	}
 
-	iterator(scope_list & _scopes, const wrapped_iterator & _it, size_type inLevel)
+	iterator(ScopeList & _scopes, const wrapped_iterator & _it, size_type inLevel)
 		: scopes(&_scopes), it(_it), level(inLevel) {}
 public:
@@ -266,5 +265,5 @@
 
 private:
-	scope_list *scopes;
+	ScopeList *scopes;
 	wrapped_iterator it;
 	size_type level;
Index: src/GenPoly/ErasableScopedMap.h
===================================================================
--- src/GenPoly/ErasableScopedMap.h	(revision b2ecd4801c2bbbcda494bff1458244b61abd1662)
+++ src/GenPoly/ErasableScopedMap.h	(revision 4c2e561f46e37c956d59cd5054091612c978e9cd)
@@ -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 b2ecd4801c2bbbcda494bff1458244b61abd1662)
+++ src/GenPoly/ScopedSet.h	(revision 4c2e561f46e37c956d59cd5054091612c978e9cd)
@@ -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;
