Consolidate member variables in a struct.

The purpose is to reduce the declaration of template bodies.