Fixed the intersect function

The numberOfbitSetForEachCategory was outofbounds, and corrupted the
heap
Cleanup & removed old code

Removed previous intersect