Various changes.

Modified data members and functions to avoid
reproducing code.

Added various helper functions to simplify code.

Should be almost ready to begin modifiying the
correlation integral functions.