Spatial pooler ongoing dev

There are a bunch of merge conflicts in the comments of this file.