 		combineSeperatedFlags(compositeA: a, compositeB: b) { (x, y) in
 			let previous = PhysicsBodyCategory.contacts[x] ?? Set<PhysicsBodyCategory>()
 			let updated = previous.union([y])
-			PhysicsBodyCategory.collisions[x] = updated
+			PhysicsBodyCategory.contacts[x] = updated
 		}
 	}
 	

		self.rawValue = rawValue
	}
	
	fileprivate static var collisions	= [PhysicsBodyCategory : Set<PhysicsBodyCategory>]()
	fileprivate static var contacts		= [PhysicsBodyCategory : Set<PhysicsBodyCategory>]()
	
}

public extension PhysicsBodyCategory {
	
	public static func enableCollision(between a: PhysicsBodyCategory, and b: PhysicsBodyCategory) {

		}
	}
	
}

// MARK: - SpriteKit Integration
internal extension PhysicsBodyCategory {
	
	var categoryBitMask : UInt32 {
		return rawValue
	}

	var collisionBitMask : UInt32 {
		var mask = PhysicsBodyCategory.none
		
		for flag in self.seperatedFlags {
			PhysicsBodyCategory.collisions[flag]?.forEach {
				mask.insert($0)
			}
		}
		
		return mask.rawValue
	}
	
	var contactTestBitMask : UInt32 {
		var mask = PhysicsBodyCategory.none
		
		for flag in self.seperatedFlags {
			PhysicsBodyCategory.contacts[flag]?.forEach {
				mask.insert($0)
			}
		}
		
		return mask.rawValue
	}
	
}

// MARK: - Decomposing Flags
fileprivate extension PhysicsBodyCategory {
	
	fileprivate var seperatedFlags : Set<PhysicsBodyCategory> {
		var flags = Set<PhysicsBodyCategory>()
		
		for i : UInt32 in 0..<32 {
			let mask = PhysicsBodyCategory(rawValue: 1 << i)
			if self.contains(mask) {
				flags.insert(mask)
