SSI

Some SSI refactoring

I changed a couple of "core" functions to make it work.