Scn generation

Basically the logic to have the indexer generate SCNs, but some other stuff as well (take too long to explain here, and mostly consists of bug fixes / touch ups).