Split IndexFunction module a bit.

I also added placeholders for the symbolic set stuff (which is a bad
name).