Added cmap parameter handling.

Rather rudimentary, as we store the cmap parameters as text files.
This might need to be included.  Additionally some changes to
make index handling consistent.